pub trait MySerializer: Sized {
    type Ok;
    type Error: Error;
    type SerializePar: MySerializePar<Ok = Self::Ok, Error = Self::Error>;
    type SerializeSco: MySerializeSco<Ok = Self::Ok, Error = Self::Error>;

    // Required methods
    fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>
       where T: Display + ?Sized;
    fn serialize_par(
        self,
        len: Option<usize>
    ) -> Result<Self::SerializePar, Self::Error>;
    fn serialize_sco(
        self,
        len: Option<usize>
    ) -> Result<Self::SerializeSco, Self::Error>;
}

Required Associated Types§

source

type Ok

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.

source

type Error: Error

The error type when some error occurs during serialization.

source

type SerializePar: MySerializePar<Ok = Self::Ok, Error = Self::Error>

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

source

type SerializeSco: MySerializeSco<Ok = Self::Ok, Error = Self::Error>

Required Methods§

source

fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>where T: Display + ?Sized,

source

fn serialize_par( self, len: Option<usize> ) -> Result<Self::SerializePar, Self::Error>

source

fn serialize_sco( self, len: Option<usize> ) -> Result<Self::SerializeSco, Self::Error>

Implementors§