pub struct ChecksumSerializer<'a, 'r> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<'a, 'r> Serializer for ChecksumSerializer<'a, 'r>
impl<'a, 'r> Serializer for ChecksumSerializer<'a, 'r>
Source§type Ok = ()
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 = ChecksumError
type Error = ChecksumError
The error type when some error occurs during serialization.
Source§type SerializeSeq = ChecksumListSerializer<'a, 'r>
type SerializeSeq = ChecksumListSerializer<'a, 'r>
Type returned from
serialize_seq
for serializing the content of the
sequence.Source§type SerializeTuple = ChecksumListSerializer<'a, 'r>
type SerializeTuple = ChecksumListSerializer<'a, 'r>
Type returned from
serialize_tuple
for serializing the content of
the tuple.Source§type SerializeTupleStruct = ChecksumListSerializer<'a, 'r>
type SerializeTupleStruct = ChecksumListSerializer<'a, 'r>
Type returned from
serialize_tuple_struct
for serializing the
content of the tuple struct.Source§type SerializeTupleVariant = ChecksumMapSerializer<'a, 'r>
type SerializeTupleVariant = ChecksumMapSerializer<'a, 'r>
Type returned from
serialize_tuple_variant
for serializing the
content of the tuple variant.Source§type SerializeMap = ChecksumMapSerializer<'a, 'r>
type SerializeMap = ChecksumMapSerializer<'a, 'r>
Type returned from
serialize_map
for serializing the content of the
map.Source§type SerializeStruct = ChecksumMapSerializer<'a, 'r>
type SerializeStruct = ChecksumMapSerializer<'a, 'r>
Type returned from
serialize_struct
for serializing the content of
the struct.Source§type SerializeStructVariant = ChecksumMapSerializer<'a, 'r>
type SerializeStructVariant = ChecksumMapSerializer<'a, 'r>
Type returned from
serialize_struct_variant
for serializing the
content of the struct variant.Source§fn serialize_bool(self, v: bool) -> Result<(), ChecksumError>
fn serialize_bool(self, v: bool) -> Result<(), ChecksumError>
Serialize a
bool
value. Read moreSource§fn serialize_map(
self,
_len: Option<usize>,
) -> Result<Self::SerializeMap, ChecksumError>
fn serialize_map( self, _len: Option<usize>, ) -> Result<Self::SerializeMap, ChecksumError>
Begin to serialize a map. This call must be followed by zero or more
calls to
serialize_key
and serialize_value
, then a call to end
. Read moreSource§fn serialize_struct(
self,
_name: &'static str,
len: usize,
) -> Result<Self::SerializeStruct, ChecksumError>
fn serialize_struct( self, _name: &'static str, len: usize, ) -> Result<Self::SerializeStruct, ChecksumError>
Begin to serialize a struct like
struct Rgb { r: u8, g: u8, b: u8 }
.
This call must be followed by zero or more calls to serialize_field
,
then a call to end
. Read moreSource§fn serialize_i8(self, v: i8) -> Result<(), ChecksumError>
fn serialize_i8(self, v: i8) -> Result<(), ChecksumError>
Serialize an
i8
value. Read moreSource§fn serialize_i16(self, v: i16) -> Result<(), ChecksumError>
fn serialize_i16(self, v: i16) -> Result<(), ChecksumError>
Serialize an
i16
value. Read moreSource§fn serialize_i32(self, v: i32) -> Result<(), ChecksumError>
fn serialize_i32(self, v: i32) -> Result<(), ChecksumError>
Serialize an
i32
value. Read moreSource§fn serialize_i64(self, v: i64) -> Result<(), ChecksumError>
fn serialize_i64(self, v: i64) -> Result<(), ChecksumError>
Serialize an
i64
value. Read moreSource§fn serialize_u8(self, v: u8) -> Result<(), ChecksumError>
fn serialize_u8(self, v: u8) -> Result<(), ChecksumError>
Serialize a
u8
value. Read moreSource§fn serialize_u16(self, v: u16) -> Result<(), ChecksumError>
fn serialize_u16(self, v: u16) -> Result<(), ChecksumError>
Serialize a
u16
value. Read moreSource§fn serialize_u32(self, v: u32) -> Result<(), ChecksumError>
fn serialize_u32(self, v: u32) -> Result<(), ChecksumError>
Serialize a
u32
value. Read moreSource§fn serialize_u64(self, v: u64) -> Result<(), ChecksumError>
fn serialize_u64(self, v: u64) -> Result<(), ChecksumError>
Serialize a
u64
value. Read moreSource§fn serialize_f32(self, v: f32) -> Result<(), ChecksumError>
fn serialize_f32(self, v: f32) -> Result<(), ChecksumError>
Serialize an
f32
value. Read moreSource§fn serialize_f64(self, v: f64) -> Result<(), ChecksumError>
fn serialize_f64(self, v: f64) -> Result<(), ChecksumError>
Serialize an
f64
value. Read moreSource§fn serialize_char(self, v: char) -> Result<(), ChecksumError>
fn serialize_char(self, v: char) -> Result<(), ChecksumError>
Serialize a character. Read more
Source§fn serialize_str(self, v: &str) -> Result<(), ChecksumError>
fn serialize_str(self, v: &str) -> Result<(), ChecksumError>
Serialize a
&str
. Read moreSource§fn serialize_bytes(self, v: &[u8]) -> Result<(), ChecksumError>
fn serialize_bytes(self, v: &[u8]) -> Result<(), ChecksumError>
Serialize a chunk of raw byte data. Read more
Source§fn serialize_none(self) -> Result<(), ChecksumError>
fn serialize_none(self) -> Result<(), ChecksumError>
Source§fn serialize_some<T>(self, value: &T) -> Result<(), ChecksumError>
fn serialize_some<T>(self, value: &T) -> Result<(), ChecksumError>
Source§fn serialize_unit(self) -> Result<(), ChecksumError>
fn serialize_unit(self) -> Result<(), ChecksumError>
Serialize a
()
value. Read moreSource§fn serialize_unit_struct(self, _name: &'static str) -> Result<(), ChecksumError>
fn serialize_unit_struct(self, _name: &'static str) -> Result<(), ChecksumError>
Source§fn serialize_unit_variant(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
) -> Result<(), ChecksumError>
fn serialize_unit_variant( self, _name: &'static str, _variant_index: u32, variant: &'static str, ) -> Result<(), ChecksumError>
Source§fn serialize_newtype_struct<T>(
self,
_name: &'static str,
value: &T,
) -> Result<(), ChecksumError>
fn serialize_newtype_struct<T>( self, _name: &'static str, value: &T, ) -> Result<(), ChecksumError>
Serialize a newtype struct like
struct Millimeters(u8)
. Read moreSource§fn serialize_newtype_variant<T>(
self,
name: &'static str,
variant_index: u32,
_variant: &'static str,
value: &T,
) -> Result<(), ChecksumError>
fn serialize_newtype_variant<T>( self, name: &'static str, variant_index: u32, _variant: &'static str, value: &T, ) -> Result<(), ChecksumError>
Source§fn serialize_seq(
self,
len: Option<usize>,
) -> Result<Self::SerializeSeq, ChecksumError>
fn serialize_seq( self, len: Option<usize>, ) -> Result<Self::SerializeSeq, ChecksumError>
Begin to serialize a variably sized sequence. This call must be
followed by zero or more calls to
serialize_element
, then a call to
end
. Read moreSource§fn serialize_tuple(
self,
len: usize,
) -> Result<Self::SerializeTuple, ChecksumError>
fn serialize_tuple( self, len: usize, ) -> Result<Self::SerializeTuple, ChecksumError>
Begin to serialize a statically sized sequence whose length will be
known at deserialization time without looking at the serialized data.
This call must be followed by zero or more calls to
serialize_element
,
then a call to end
. Read moreSource§fn serialize_tuple_struct(
self,
name: &'static str,
len: usize,
) -> Result<Self::SerializeTupleStruct, ChecksumError>
fn serialize_tuple_struct( self, name: &'static str, len: usize, ) -> Result<Self::SerializeTupleStruct, ChecksumError>
Begin to serialize a tuple struct like
struct Rgb(u8, u8, u8)
. This
call must be followed by zero or more calls to serialize_field
, then a
call to end
. Read moreSource§fn serialize_tuple_variant(
self,
_name: &'static str,
_variant_index: u32,
_variant: &'static str,
len: usize,
) -> Result<Self::SerializeTupleVariant, ChecksumError>
fn serialize_tuple_variant( self, _name: &'static str, _variant_index: u32, _variant: &'static str, len: usize, ) -> Result<Self::SerializeTupleVariant, ChecksumError>
Begin to serialize a tuple variant like
E::T
in enum E { T(u8, u8) }
. This call must be followed by zero or more calls to
serialize_field
, then a call to end
. Read moreSource§fn serialize_struct_variant(
self,
_name: &'static str,
_variant_index: u32,
_variant: &'static str,
len: usize,
) -> Result<Self::SerializeStructVariant, ChecksumError>
fn serialize_struct_variant( self, _name: &'static str, _variant_index: u32, _variant: &'static str, len: usize, ) -> Result<Self::SerializeStructVariant, ChecksumError>
Begin to serialize a struct variant like
E::S
in enum E { S { r: u8, g: u8, b: u8 } }
. This call must be followed by zero or more calls to
serialize_field
, then a call to end
. Read moreSource§fn serialize_i128(self, v: i128) -> Result<Self::Ok, Self::Error>
fn serialize_i128(self, v: i128) -> Result<Self::Ok, Self::Error>
Serialize an
i128
value. Read moreSource§fn serialize_u128(self, v: u128) -> Result<Self::Ok, Self::Error>
fn serialize_u128(self, v: u128) -> Result<Self::Ok, Self::Error>
Serialize a
u128
value. Read moreSource§fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>
fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>
Collect an iterator as a sequence. Read more
Source§fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>
fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>
Collect an iterator as a map. Read more
Source§fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>
fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>
Serialize a string produced by an implementation of
Display
. Read moreSource§fn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Determine whether
Serialize
implementations should serialize in
human-readable form. Read moreAuto Trait Implementations§
impl<'a, 'r> Freeze for ChecksumSerializer<'a, 'r>
impl<'a, 'r> RefUnwindSafe for ChecksumSerializer<'a, 'r>
impl<'a, 'r> Send for ChecksumSerializer<'a, 'r>
impl<'a, 'r> Sync for ChecksumSerializer<'a, 'r>
impl<'a, 'r> Unpin for ChecksumSerializer<'a, 'r>
impl<'a, 'r> !UnwindSafe for ChecksumSerializer<'a, 'r>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.