[][src]Struct serde_xdr::Serializer

pub struct Serializer<'w, W> where
    W: WriteBytesExt + 'w, 
{ /* fields omitted */ }

Serializer for the XDR format.

Structure that holds a mutable borrow of the writer it serializes data to. It has an implementation of serde::Serializer so that it can serialize data into its XDR representation.

Implementations

impl<'w, W> Serializer<'w, W> where
    W: WriteBytesExt + 'w, 
[src]

pub fn new(writer: &'w mut W) -> Self[src]

Create a new instance that serializes data into the given generic writer.

Trait Implementations

impl<'w, W> SerializeMap for Serializer<'w, W> where
    W: WriteBytesExt + 'w, 
[src]

type Ok = Self

Must match the Ok type of our Serializer.

type Error = CompatSerializationError

Must match the Error type of our Serializer.

impl<'w, W> Serializer for Serializer<'w, W> where
    W: WriteBytesExt + 'w, 
[src]

type Ok = Self

The output type produced by this Serializer during successful serialization. Most serializers that produce text or binary output should set Ok = () and serialize into an io::Write or buffer contained within the Serializer instance. Serializers that build in-memory data structures may be simplified by using Ok to propagate the data structure around. Read more

type Error = CompatSerializationError

The error type when some error occurs during serialization.

type SerializeSeq = SequenceSerializer<'w, W>

Type returned from serialize_seq for serializing the content of the sequence. Read more

type SerializeTuple = SequenceSerializer<'w, W>

Type returned from serialize_tuple for serializing the content of the tuple. Read more

type SerializeTupleStruct = SequenceSerializer<'w, W>

Type returned from serialize_tuple_struct for serializing the content of the tuple struct. Read more

type SerializeTupleVariant = SequenceSerializer<'w, W>

Type returned from serialize_tuple_variant for serializing the content of the tuple variant. Read more

type SerializeMap = Self

Type returned from serialize_map for serializing the content of the map. Read more

type SerializeStruct = StructSerializer<'w, W>

Type returned from serialize_struct for serializing the content of the struct. Read more

type SerializeStructVariant = StructSerializer<'w, W>

Type returned from serialize_struct_variant for serializing the content of the struct variant. Read more

Auto Trait Implementations

impl<'w, W> RefUnwindSafe for Serializer<'w, W> where
    W: RefUnwindSafe

impl<'w, W> Send for Serializer<'w, W> where
    W: Send

impl<'w, W> Sync for Serializer<'w, W> where
    W: Sync

impl<'w, W> Unpin for Serializer<'w, W>

impl<'w, W> !UnwindSafe for Serializer<'w, W>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.