pub struct Nothing;
Expand description
Serializer to serialize values into and from nothing.
Trait Implementations§
Source§impl<'de> Deserializer<'de> for Nothing
impl<'de> Deserializer<'de> for Nothing
Source§type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during
deserialization.
Source§fn deserialize_any<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_any<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Require the
Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read moreSource§fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a bool
value.Source§fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting an i8
value.Source§fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting an i16
value.Source§fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting an i32
value.Source§fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting an i64
value.Source§fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a u8
value.Source§fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a u16
value.Source§fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a u32
value.Source§fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a u64
value.Source§fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Source§fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Source§fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a f32
value.Source§fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a f64
value.Source§fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a char
value.Source§fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_option<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_option<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting an optional value. Read moreSource§fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a unit value.Source§fn deserialize_unit_struct<V>(
self,
_: &'static str,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
_: &'static str,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a unit struct with a
particular name.Source§fn deserialize_newtype_struct<V>(
self,
_: &'static str,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
_: &'static str,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a newtype struct with a
particular name.Source§fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a sequence of values.Source§fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data.Source§fn deserialize_tuple_struct<V>(
self,
_: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
_: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a tuple struct with a
particular name and number of fields.Source§fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a map of key-value pairs.Source§fn deserialize_struct<V>(
self,
_: &'static str,
fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_: &'static str,
fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting a struct with a particular
name and fields.Source§fn deserialize_enum<V>(
self,
_: &'static str,
_: &'static [&'static str],
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_: &'static str,
_: &'static [&'static str],
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting an enum value with a
particular name and possible variants.Source§fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type is expecting the name of a struct
field or the discriminant of an enum variant.Source§fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Hint that the
Deserialize
type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read moreSource§fn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Determine whether
Deserialize
implementations should expect to
deserialize their human-readable form. Read moreSource§impl<'de> EnumAccess<'de> for Nothing
impl<'de> EnumAccess<'de> for Nothing
Source§type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during
deserialization.
Source§type Variant = Nothing
type Variant = Nothing
The
Visitor
that will be used to deserialize the content of the enum
variant.Source§fn variant_seed<V>(
self,
seed: V,
) -> Result<(V::Value, Self::Variant), NothingDeserializeError>where
V: DeserializeSeed<'de>,
fn variant_seed<V>(
self,
seed: V,
) -> Result<(V::Value, Self::Variant), NothingDeserializeError>where
V: DeserializeSeed<'de>,
variant
is called to identify which variant to deserialize. Read moreSource§fn variant<V>(self) -> Result<(V, Self::Variant), NothingDeserializeError>where
V: Deserialize<'de>,
fn variant<V>(self) -> Result<(V, Self::Variant), NothingDeserializeError>where
V: Deserialize<'de>,
variant
is called to identify which variant to deserialize. Read moreSource§impl<'de> MapAccess<'de> for Nothing
impl<'de> MapAccess<'de> for Nothing
Source§type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during
deserialization.
Source§fn next_key_seed<K>(
&mut self,
_: K,
) -> Result<Option<K::Value>, NothingDeserializeError>where
K: DeserializeSeed<'de>,
fn next_key_seed<K>(
&mut self,
_: K,
) -> Result<Option<K::Value>, NothingDeserializeError>where
K: DeserializeSeed<'de>,
This returns
Ok(Some(key))
for the next key in the map, or Ok(None)
if there are no more remaining entries. Read moreSource§fn next_value_seed<V>(
&mut self,
_: V,
) -> Result<V::Value, NothingDeserializeError>where
V: DeserializeSeed<'de>,
fn next_value_seed<V>(
&mut self,
_: V,
) -> Result<V::Value, NothingDeserializeError>where
V: DeserializeSeed<'de>,
This returns a
Ok(value)
for the next value in the map. Read moreSource§fn next_entry_seed<K, V>(
&mut self,
_: K,
_: V,
) -> Result<Option<(K::Value, V::Value)>, NothingDeserializeError>where
K: DeserializeSeed<'de>,
V: DeserializeSeed<'de>,
fn next_entry_seed<K, V>(
&mut self,
_: K,
_: V,
) -> Result<Option<(K::Value, V::Value)>, NothingDeserializeError>where
K: DeserializeSeed<'de>,
V: DeserializeSeed<'de>,
This returns
Ok(Some((key, value)))
for the next (key-value) pair in
the map, or Ok(None)
if there are no more remaining items. Read moreSource§fn next_key<K>(&mut self) -> Result<Option<K>, NothingDeserializeError>where
K: Deserialize<'de>,
fn next_key<K>(&mut self) -> Result<Option<K>, NothingDeserializeError>where
K: Deserialize<'de>,
This returns
Ok(Some(key))
for the next key in the map, or Ok(None)
if there are no more remaining entries. Read moreSource§fn next_value<V>(&mut self) -> Result<V, NothingDeserializeError>where
V: Deserialize<'de>,
fn next_value<V>(&mut self) -> Result<V, NothingDeserializeError>where
V: Deserialize<'de>,
This returns a
Ok(value)
for the next value in the map. Read moreSource§fn next_entry<K, V>(
&mut self,
) -> Result<Option<(K, V)>, NothingDeserializeError>where
K: Deserialize<'de>,
V: Deserialize<'de>,
fn next_entry<K, V>(
&mut self,
) -> Result<Option<(K, V)>, NothingDeserializeError>where
K: Deserialize<'de>,
V: Deserialize<'de>,
This returns
Ok(Some((key, value)))
for the next (key-value) pair in
the map, or Ok(None)
if there are no more remaining items. Read moreSource§impl Ord for Nothing
impl Ord for Nothing
Source§impl PartialOrd for Nothing
impl PartialOrd for Nothing
Source§impl<'de> SeqAccess<'de> for Nothing
impl<'de> SeqAccess<'de> for Nothing
Source§type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during
deserialization.
Source§fn next_element_seed<T>(
&mut self,
_: T,
) -> Result<Option<T::Value>, NothingDeserializeError>where
T: DeserializeSeed<'de>,
fn next_element_seed<T>(
&mut self,
_: T,
) -> Result<Option<T::Value>, NothingDeserializeError>where
T: DeserializeSeed<'de>,
This returns
Ok(Some(value))
for the next value in the sequence, or
Ok(None)
if there are no more remaining items. Read moreSource§fn next_element<T>(&mut self) -> Result<Option<T>, NothingDeserializeError>where
T: Deserialize<'de>,
fn next_element<T>(&mut self) -> Result<Option<T>, NothingDeserializeError>where
T: Deserialize<'de>,
This returns
Ok(Some(value))
for the next value in the sequence, or
Ok(None)
if there are no more remaining items. Read moreSource§impl SerializeMap for Nothing
impl SerializeMap for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_key<T: ?Sized>(
&mut self,
_: &T,
) -> Result<(), NothingSerializeError>
fn serialize_key<T: ?Sized>( &mut self, _: &T, ) -> Result<(), NothingSerializeError>
Serialize a map key. Read more
Source§fn serialize_value<T: ?Sized>(
&mut self,
_: &T,
) -> Result<(), NothingSerializeError>
fn serialize_value<T: ?Sized>( &mut self, _: &T, ) -> Result<(), NothingSerializeError>
Serialize a map value. Read more
Source§impl SerializeSeq for Nothing
impl SerializeSeq for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_element<T: ?Sized>(
&mut self,
_: &T,
) -> Result<(), NothingSerializeError>
fn serialize_element<T: ?Sized>( &mut self, _: &T, ) -> Result<(), NothingSerializeError>
Serialize a sequence element.
Source§impl SerializeStruct for Nothing
impl SerializeStruct for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_field<T>(
&mut self,
_: &'static str,
value: &T,
) -> Result<(), NothingSerializeError>
fn serialize_field<T>( &mut self, _: &'static str, value: &T, ) -> Result<(), NothingSerializeError>
Serialize a struct field.
Source§fn skip_field(&mut self, _: &'static str) -> Result<(), NothingSerializeError>
fn skip_field(&mut self, _: &'static str) -> Result<(), NothingSerializeError>
Indicate that a struct field has been skipped. Read more
Source§impl SerializeStructVariant for Nothing
impl SerializeStructVariant for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_field<T>(
&mut self,
_: &'static str,
value: &T,
) -> Result<(), NothingSerializeError>
fn serialize_field<T>( &mut self, _: &'static str, value: &T, ) -> Result<(), NothingSerializeError>
Serialize a struct variant field.
Source§fn skip_field(&mut self, _: &'static str) -> Result<(), NothingSerializeError>
fn skip_field(&mut self, _: &'static str) -> Result<(), NothingSerializeError>
Indicate that a struct variant field has been skipped. Read more
Source§impl SerializeTuple for Nothing
impl SerializeTuple for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_element<T>(
&mut self,
value: &T,
) -> Result<(), NothingSerializeError>
fn serialize_element<T>( &mut self, value: &T, ) -> Result<(), NothingSerializeError>
Serialize a tuple element.
Source§impl SerializeTupleStruct for Nothing
impl SerializeTupleStruct for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_field<T>(&mut self, value: &T) -> Result<(), NothingSerializeError>
fn serialize_field<T>(&mut self, value: &T) -> Result<(), NothingSerializeError>
Serialize a tuple struct field.
Source§impl SerializeTupleVariant for Nothing
impl SerializeTupleVariant for Nothing
Source§type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the
Error
type of our Serializer
.Source§fn serialize_field<T>(&mut self, value: &T) -> Result<(), NothingSerializeError>
fn serialize_field<T>(&mut self, value: &T) -> Result<(), NothingSerializeError>
Serialize a tuple variant field.
Source§impl Serializer for Nothing
impl Serializer for Nothing
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 = NothingSerializeError
type Error = NothingSerializeError
The error type when some error occurs during serialization.
Source§type SerializeSeq = Nothing
type SerializeSeq = Nothing
Type returned from
serialize_seq
for serializing the content of the
sequence.Source§type SerializeTuple = Nothing
type SerializeTuple = Nothing
Type returned from
serialize_tuple
for serializing the content of
the tuple.Source§type SerializeTupleStruct = Nothing
type SerializeTupleStruct = Nothing
Type returned from
serialize_tuple_struct
for serializing the
content of the tuple struct.Source§type SerializeTupleVariant = Nothing
type SerializeTupleVariant = Nothing
Type returned from
serialize_tuple_variant
for serializing the
content of the tuple variant.Source§type SerializeMap = Nothing
type SerializeMap = Nothing
Type returned from
serialize_map
for serializing the content of the
map.Source§type SerializeStruct = Nothing
type SerializeStruct = Nothing
Type returned from
serialize_struct
for serializing the content of
the struct.Source§type SerializeStructVariant = Nothing
type SerializeStructVariant = Nothing
Type returned from
serialize_struct_variant
for serializing the
content of the struct variant.Source§fn serialize_bool(self, v: bool) -> Result<(), NothingSerializeError>
fn serialize_bool(self, v: bool) -> Result<(), NothingSerializeError>
Serialize a
bool
value. Read moreSource§fn serialize_i8(self, v: i8) -> Result<(), NothingSerializeError>
fn serialize_i8(self, v: i8) -> Result<(), NothingSerializeError>
Serialize an
i8
value. Read moreSource§fn serialize_i16(self, v: i16) -> Result<(), NothingSerializeError>
fn serialize_i16(self, v: i16) -> Result<(), NothingSerializeError>
Serialize an
i16
value. Read moreSource§fn serialize_i32(self, v: i32) -> Result<(), NothingSerializeError>
fn serialize_i32(self, v: i32) -> Result<(), NothingSerializeError>
Serialize an
i32
value. Read moreSource§fn serialize_i64(self, v: i64) -> Result<(), NothingSerializeError>
fn serialize_i64(self, v: i64) -> Result<(), NothingSerializeError>
Serialize an
i64
value. Read moreSource§fn serialize_u8(self, v: u8) -> Result<(), NothingSerializeError>
fn serialize_u8(self, v: u8) -> Result<(), NothingSerializeError>
Serialize a
u8
value. Read moreSource§fn serialize_u16(self, v: u16) -> Result<(), NothingSerializeError>
fn serialize_u16(self, v: u16) -> Result<(), NothingSerializeError>
Serialize a
u16
value. Read moreSource§fn serialize_u32(self, v: u32) -> Result<(), NothingSerializeError>
fn serialize_u32(self, v: u32) -> Result<(), NothingSerializeError>
Serialize a
u32
value. Read moreSource§fn serialize_u64(self, v: u64) -> Result<(), NothingSerializeError>
fn serialize_u64(self, v: u64) -> Result<(), NothingSerializeError>
Serialize a
u64
value. Read moreSource§fn serialize_i128(self, v: i128) -> Result<(), NothingSerializeError>
fn serialize_i128(self, v: i128) -> Result<(), NothingSerializeError>
Serialize an
i128
value. Read moreSource§fn serialize_u128(self, v: u128) -> Result<(), NothingSerializeError>
fn serialize_u128(self, v: u128) -> Result<(), NothingSerializeError>
Serialize a
u128
value. Read moreSource§fn serialize_f32(self, v: f32) -> Result<(), NothingSerializeError>
fn serialize_f32(self, v: f32) -> Result<(), NothingSerializeError>
Serialize an
f32
value. Read moreSource§fn serialize_f64(self, v: f64) -> Result<(), NothingSerializeError>
fn serialize_f64(self, v: f64) -> Result<(), NothingSerializeError>
Serialize an
f64
value. Read moreSource§fn serialize_char(self, v: char) -> Result<(), NothingSerializeError>
fn serialize_char(self, v: char) -> Result<(), NothingSerializeError>
Serialize a character. Read more
Source§fn serialize_str(self, v: &str) -> Result<(), NothingSerializeError>
fn serialize_str(self, v: &str) -> Result<(), NothingSerializeError>
Serialize a
&str
. Read moreSource§fn serialize_bytes(self, v: &[u8]) -> Result<(), NothingSerializeError>
fn serialize_bytes(self, v: &[u8]) -> Result<(), NothingSerializeError>
Serialize a chunk of raw byte data. Read more
Source§fn serialize_none(self) -> Result<(), NothingSerializeError>
fn serialize_none(self) -> Result<(), NothingSerializeError>
Source§fn serialize_some<T: ?Sized>(self, _: &T) -> Result<(), NothingSerializeError>
fn serialize_some<T: ?Sized>(self, _: &T) -> Result<(), NothingSerializeError>
Source§fn serialize_unit(self) -> Result<(), NothingSerializeError>
fn serialize_unit(self) -> Result<(), NothingSerializeError>
Serialize a
()
value. Read moreSource§fn serialize_unit_struct(
self,
_: &'static str,
) -> Result<(), NothingSerializeError>
fn serialize_unit_struct( self, _: &'static str, ) -> Result<(), NothingSerializeError>
Source§fn serialize_unit_variant(
self,
_: &'static str,
_: u32,
_: &'static str,
) -> Result<(), NothingSerializeError>
fn serialize_unit_variant( self, _: &'static str, _: u32, _: &'static str, ) -> Result<(), NothingSerializeError>
Source§fn serialize_newtype_struct<T>(
self,
_: &'static str,
value: &T,
) -> Result<(), NothingSerializeError>
fn serialize_newtype_struct<T>( self, _: &'static str, value: &T, ) -> Result<(), NothingSerializeError>
Serialize a newtype struct like
struct Millimeters(u8)
. Read moreSource§fn serialize_newtype_variant<T>(
self,
_: &'static str,
_: u32,
_: &'static str,
value: &T,
) -> Result<(), NothingSerializeError>
fn serialize_newtype_variant<T>( self, _: &'static str, _: u32, _: &'static str, value: &T, ) -> Result<(), NothingSerializeError>
Source§fn serialize_seq(self, _: Option<usize>) -> Result<Self, NothingSerializeError>
fn serialize_seq(self, _: Option<usize>) -> Result<Self, NothingSerializeError>
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, _: usize) -> Result<Self, NothingSerializeError>
fn serialize_tuple(self, _: usize) -> Result<Self, NothingSerializeError>
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,
_: &'static str,
_: usize,
) -> Result<Self, NothingSerializeError>
fn serialize_tuple_struct( self, _: &'static str, _: usize, ) -> Result<Self, NothingSerializeError>
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,
_: &'static str,
_: u32,
_: &'static str,
_: usize,
) -> Result<Self, NothingSerializeError>
fn serialize_tuple_variant( self, _: &'static str, _: u32, _: &'static str, _: usize, ) -> Result<Self, NothingSerializeError>
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_map(self, _: Option<usize>) -> Result<Self, NothingSerializeError>
fn serialize_map(self, _: Option<usize>) -> Result<Self, NothingSerializeError>
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,
_: &'static str,
_: usize,
) -> Result<Self, NothingSerializeError>
fn serialize_struct( self, _: &'static str, _: usize, ) -> Result<Self, NothingSerializeError>
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_struct_variant(
self,
_: &'static str,
_: u32,
_: &'static str,
_: usize,
) -> Result<Self, NothingSerializeError>
fn serialize_struct_variant( self, _: &'static str, _: u32, _: &'static str, _: usize, ) -> Result<Self, NothingSerializeError>
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 collect_seq<I>(self, iter: I) -> Result<(), NothingSerializeError>where
I: IntoIterator,
fn collect_seq<I>(self, iter: I) -> Result<(), NothingSerializeError>where
I: IntoIterator,
Collect an iterator as a sequence. Read more
Source§fn collect_map<K, V, I>(self, iter: I) -> Result<(), NothingSerializeError>where
I: IntoIterator<Item = (K, V)>,
fn collect_map<K, V, I>(self, iter: I) -> Result<(), NothingSerializeError>where
I: IntoIterator<Item = (K, V)>,
Collect an iterator as a map. Read more
Source§fn collect_str<T>(self, value: &T) -> Result<(), NothingSerializeError>
fn collect_str<T>(self, value: &T) -> Result<(), NothingSerializeError>
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 moreSource§impl<'de> VariantAccess<'de> for Nothing
impl<'de> VariantAccess<'de> for Nothing
Source§type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during
deserialization. Must match the error type of our
EnumAccess
.Source§fn unit_variant(self) -> Result<(), NothingDeserializeError>
fn unit_variant(self) -> Result<(), NothingDeserializeError>
Called when deserializing a variant with no values. Read more
Source§fn newtype_variant_seed<T>(
self,
seed: T,
) -> Result<T::Value, NothingDeserializeError>where
T: DeserializeSeed<'de>,
fn newtype_variant_seed<T>(
self,
seed: T,
) -> Result<T::Value, NothingDeserializeError>where
T: DeserializeSeed<'de>,
Called when deserializing a variant with a single value. Read more
Source§fn newtype_variant<T>(self) -> Result<T, NothingDeserializeError>where
T: Deserialize<'de>,
fn newtype_variant<T>(self) -> Result<T, NothingDeserializeError>where
T: Deserialize<'de>,
Called when deserializing a variant with a single value. Read more
Source§fn tuple_variant<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn tuple_variant<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Called when deserializing a tuple-like variant. Read more
Source§fn struct_variant<V>(
self,
fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
fn struct_variant<V>(
self,
fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, NothingDeserializeError>where
V: Visitor<'de>,
Called when deserializing a struct-like variant. Read more
impl Copy for Nothing
impl Eq for Nothing
impl StructuralPartialEq for Nothing
Auto Trait Implementations§
impl Freeze for Nothing
impl RefUnwindSafe for Nothing
impl Send for Nothing
impl Sync for Nothing
impl Unpin for Nothing
impl UnwindSafe for Nothing
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