[][src]Struct serde_bytes_repr::ByteFmtSerializer

pub struct ByteFmtSerializer<S> { /* fields omitted */ }

Serializer-adapter which encodes bytes to using the specified encoding. The format is serialized to the data formats string representation.

Implementations

impl<S> ByteFmtSerializer<S>[src]

pub fn base64(ser: S, cfg: Config) -> Self[src]

Crates an adapter which serializes to and from a Base64 representation. Provide a configuration from the base64 crate specifying the specifics on how you want the bytes encoded.

pub fn hex(ser: S) -> Self[src]

Creates an adapter which serializes to a HEX representation.

Trait Implementations

impl<S: Serializer> Serializer for ByteFmtSerializer<S>[src]

type Ok = S::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. Read more

type Error = S::Error

The error type when some error occurs during serialization.

type SerializeSeq = SerializeSeq<S::SerializeSeq>

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

type SerializeTuple = SerializeTuple<S::SerializeTuple>

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

type SerializeTupleStruct = SerializeTupleStruct<S::SerializeTupleStruct>

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

type SerializeTupleVariant = SerializeTupleVariant<S::SerializeTupleVariant>

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

type SerializeMap = SerializeMap<S::SerializeMap>

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

type SerializeStruct = SerializeStruct<S::SerializeStruct>

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

type SerializeStructVariant = SerializeStructVariant<S::SerializeStructVariant>

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

Auto Trait Implementations

impl<S> RefUnwindSafe for ByteFmtSerializer<S> where
    S: RefUnwindSafe

impl<S> Send for ByteFmtSerializer<S> where
    S: Send

impl<S> Sync for ByteFmtSerializer<S> where
    S: Sync

impl<S> Unpin for ByteFmtSerializer<S> where
    S: Unpin

impl<S> UnwindSafe for ByteFmtSerializer<S> where
    S: UnwindSafe

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.