Struct rump::transport::Serializer [] [src]

pub struct Serializer {
    id: String,
    binary: bool,
    mode: SerializerType,
}

Describes the underling Serialization types used

Fields

id
binary

true if the data being serialized is binary, false otherwise

mode

an enum referring to the type of serilizer

Methods

impl Serializer

fn json() -> Self

fn new(mode: SerializerType) -> Self

fn encode<'a, T: Encodable>(&self, message: &T) -> Message<'a>

Serialize an encodable message into one that can be sent over a socket

fn decode<T: Decodable>(&self, message: &str) -> WampResult<T>

Trait Implementations

impl Send for Serializer

Derived Implementations

impl Clone for Serializer

fn clone(&self) -> Serializer

fn clone_from(&mut self, source: &Self)

impl Debug for Serializer

fn fmt(&self, __arg_0: &mut Formatter) -> Result