Struct serde_nothing::Nothing
source · [−]pub struct Nothing;
Expand description
Serializer to serialize values into and from nothing.
Trait Implementations
sourceimpl<'de> Deserializer<'de> for Nothing
impl<'de> Deserializer<'de> for Nothing
type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during deserialization. Read more
sourcefn 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 more
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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>,
Hint that the Deserialize
type is expecting an i128
value. Read more
sourcefn 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>,
Hint that the Deserialize
type is expecting an u128
value. Read more
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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.
sourcefn 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. Read more
sourcefn 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. Read more
sourcefn 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.
sourcefn 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. Read more
sourcefn 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. Read more
sourcefn 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.
sourcefn 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. Read more
sourcefn 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. Read more
sourcefn 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. Read more
sourcefn 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 more
sourcefn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Determine whether Deserialize
implementations should expect to
deserialize their human-readable form. Read more
sourceimpl<'de> EnumAccess<'de> for Nothing
impl<'de> EnumAccess<'de> for Nothing
type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during deserialization. Read more
type Variant = Self
type Variant = Self
The Visitor
that will be used to deserialize the content of the enum
variant. Read more
sourcefn 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 more
sourcefn 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 more
sourceimpl<'de> MapAccess<'de> for Nothing
impl<'de> MapAccess<'de> for Nothing
type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during deserialization. Read more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourceimpl Ord for Nothing
impl Ord for Nothing
sourceimpl PartialOrd<Nothing> for Nothing
impl PartialOrd<Nothing> for Nothing
sourcefn partial_cmp(&self, other: &Nothing) -> Option<Ordering>
fn partial_cmp(&self, other: &Nothing) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<'de> SeqAccess<'de> for Nothing
impl<'de> SeqAccess<'de> for Nothing
type Error = NothingDeserializeError
type Error = NothingDeserializeError
The error type that can be returned if some error occurs during deserialization. Read more
sourcefn 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 more
sourcefn 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 more
sourceimpl SerializeMap for Nothing
impl SerializeMap for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn 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
sourcefn 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
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a map.
sourceimpl SerializeSeq for Nothing
impl SerializeSeq for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn serialize_element<T: ?Sized>(
&mut self,
_: &T
) -> Result<(), NothingSerializeError>
fn serialize_element<T: ?Sized>(
&mut self,
_: &T
) -> Result<(), NothingSerializeError>
Serialize a sequence element.
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a sequence.
sourceimpl SerializeStruct for Nothing
impl SerializeStruct for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn serialize_field<T: ?Sized>(
&mut self,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_field<T: ?Sized>(
&mut self,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a struct field.
sourcefn 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.
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a struct.
sourceimpl SerializeStructVariant for Nothing
impl SerializeStructVariant for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn serialize_field<T: ?Sized>(
&mut self,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_field<T: ?Sized>(
&mut self,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a struct variant field.
sourcefn 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.
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a struct variant.
sourceimpl SerializeTuple for Nothing
impl SerializeTuple for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn serialize_element<T: ?Sized>(
&mut self,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_element<T: ?Sized>(
&mut self,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a tuple element.
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a tuple.
sourceimpl SerializeTupleStruct for Nothing
impl SerializeTupleStruct for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn serialize_field<T: ?Sized>(
&mut self,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_field<T: ?Sized>(
&mut self,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a tuple struct field.
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a tuple struct.
sourceimpl SerializeTupleVariant for Nothing
impl SerializeTupleVariant for Nothing
type Error = NothingSerializeError
type Error = NothingSerializeError
Must match the Error
type of our Serializer
.
sourcefn serialize_field<T: ?Sized>(
&mut self,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_field<T: ?Sized>(
&mut self,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a tuple variant field.
sourcefn end(self) -> Result<(), NothingSerializeError>
fn end(self) -> Result<(), NothingSerializeError>
Finish serializing a tuple variant.
sourceimpl Serializer for Nothing
impl Serializer for Nothing
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. Read more
type Error = NothingSerializeError
type Error = NothingSerializeError
The error type when some error occurs during serialization.
type SerializeSeq = Self
type SerializeSeq = Self
Type returned from serialize_seq
for serializing the content of the
sequence. Read more
type SerializeTuple = Self
type SerializeTuple = Self
Type returned from serialize_tuple
for serializing the content of
the tuple. Read more
type SerializeTupleStruct = Self
type SerializeTupleStruct = Self
Type returned from serialize_tuple_struct
for serializing the
content of the tuple struct. Read more
type SerializeTupleVariant = Self
type SerializeTupleVariant = Self
Type returned from serialize_tuple_variant
for serializing the
content of the tuple variant. Read more
type SerializeMap = Self
type SerializeMap = Self
Type returned from serialize_map
for serializing the content of the
map. Read more
type SerializeStruct = Self
type SerializeStruct = Self
Type returned from serialize_struct
for serializing the content of
the struct. Read more
type SerializeStructVariant = Self
type SerializeStructVariant = Self
Type returned from serialize_struct_variant
for serializing the
content of the struct variant. Read more
sourcefn serialize_bool(self, v: bool) -> Result<(), NothingSerializeError>
fn serialize_bool(self, v: bool) -> Result<(), NothingSerializeError>
Serialize a bool
value. Read more
sourcefn serialize_i8(self, v: i8) -> Result<(), NothingSerializeError>
fn serialize_i8(self, v: i8) -> Result<(), NothingSerializeError>
Serialize an i8
value. Read more
sourcefn serialize_i16(self, v: i16) -> Result<(), NothingSerializeError>
fn serialize_i16(self, v: i16) -> Result<(), NothingSerializeError>
Serialize an i16
value. Read more
sourcefn serialize_i32(self, v: i32) -> Result<(), NothingSerializeError>
fn serialize_i32(self, v: i32) -> Result<(), NothingSerializeError>
Serialize an i32
value. Read more
sourcefn serialize_i64(self, v: i64) -> Result<(), NothingSerializeError>
fn serialize_i64(self, v: i64) -> Result<(), NothingSerializeError>
Serialize an i64
value. Read more
sourcefn serialize_u8(self, v: u8) -> Result<(), NothingSerializeError>
fn serialize_u8(self, v: u8) -> Result<(), NothingSerializeError>
Serialize a u8
value. Read more
sourcefn serialize_u16(self, v: u16) -> Result<(), NothingSerializeError>
fn serialize_u16(self, v: u16) -> Result<(), NothingSerializeError>
Serialize a u16
value. Read more
sourcefn serialize_u32(self, v: u32) -> Result<(), NothingSerializeError>
fn serialize_u32(self, v: u32) -> Result<(), NothingSerializeError>
Serialize a u32
value. Read more
sourcefn serialize_u64(self, v: u64) -> Result<(), NothingSerializeError>
fn serialize_u64(self, v: u64) -> Result<(), NothingSerializeError>
Serialize a u64
value. Read more
sourcefn serialize_i128(self, v: i128) -> Result<(), NothingSerializeError>
fn serialize_i128(self, v: i128) -> Result<(), NothingSerializeError>
Serialize an i128
value. Read more
sourcefn serialize_u128(self, v: u128) -> Result<(), NothingSerializeError>
fn serialize_u128(self, v: u128) -> Result<(), NothingSerializeError>
Serialize a u128
value. Read more
sourcefn serialize_f32(self, v: f32) -> Result<(), NothingSerializeError>
fn serialize_f32(self, v: f32) -> Result<(), NothingSerializeError>
Serialize an f32
value. Read more
sourcefn serialize_f64(self, v: f64) -> Result<(), NothingSerializeError>
fn serialize_f64(self, v: f64) -> Result<(), NothingSerializeError>
Serialize an f64
value. Read more
sourcefn serialize_char(self, v: char) -> Result<(), NothingSerializeError>
fn serialize_char(self, v: char) -> Result<(), NothingSerializeError>
Serialize a character. Read more
sourcefn serialize_str(self, v: &str) -> Result<(), NothingSerializeError>
fn serialize_str(self, v: &str) -> Result<(), NothingSerializeError>
Serialize a &str
. Read more
sourcefn serialize_bytes(self, v: &[u8]) -> Result<(), NothingSerializeError>
fn serialize_bytes(self, v: &[u8]) -> Result<(), NothingSerializeError>
Serialize a chunk of raw byte data. Read more
sourcefn serialize_none(self) -> Result<(), NothingSerializeError>
fn serialize_none(self) -> Result<(), NothingSerializeError>
sourcefn serialize_some<T: ?Sized>(self, _: &T) -> Result<(), NothingSerializeError>
fn serialize_some<T: ?Sized>(self, _: &T) -> Result<(), NothingSerializeError>
sourcefn serialize_unit(self) -> Result<(), NothingSerializeError>
fn serialize_unit(self) -> Result<(), NothingSerializeError>
Serialize a ()
value. Read more
sourcefn serialize_unit_struct(
self,
_: &'static str
) -> Result<(), NothingSerializeError>
fn serialize_unit_struct(
self,
_: &'static str
) -> Result<(), NothingSerializeError>
Serialize a unit struct like struct Unit
or PhantomData<T>
. Read more
sourcefn serialize_unit_variant(
self,
_: &'static str,
_: u32,
_: &'static str
) -> Result<(), NothingSerializeError>
fn serialize_unit_variant(
self,
_: &'static str,
_: u32,
_: &'static str
) -> Result<(), NothingSerializeError>
Serialize a unit variant like E::A
in enum E { A, B }
. Read more
sourcefn serialize_newtype_struct<T: ?Sized>(
self,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_newtype_struct<T: ?Sized>(
self,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a newtype struct like struct Millimeters(u8)
. Read more
sourcefn serialize_newtype_variant<T: ?Sized>(
self,
_: &'static str,
_: u32,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
fn serialize_newtype_variant<T: ?Sized>(
self,
_: &'static str,
_: u32,
_: &'static str,
value: &T
) -> Result<(), NothingSerializeError> where
T: Serialize,
Serialize a newtype variant like E::N
in enum E { N(u8) }
. Read more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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
sourcefn 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
sourcefn collect_str<T: ?Sized>(self, value: &T) -> Result<(), NothingSerializeError> where
T: Display,
fn collect_str<T: ?Sized>(self, value: &T) -> Result<(), NothingSerializeError> where
T: Display,
Serialize a string produced by an implementation of Display
. Read more
sourcefn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Determine whether Serialize
implementations should serialize in
human-readable form. Read more
sourceimpl<'de> VariantAccess<'de> for Nothing
impl<'de> VariantAccess<'de> for Nothing
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
. Read more
sourcefn unit_variant(self) -> Result<(), NothingDeserializeError>
fn unit_variant(self) -> Result<(), NothingDeserializeError>
Called when deserializing a variant with no values. Read more
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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 StructuralEq for Nothing
impl StructuralPartialEq for Nothing
Auto Trait Implementations
impl RefUnwindSafe for Nothing
impl Send for Nothing
impl Sync for Nothing
impl Unpin for Nothing
impl UnwindSafe for Nothing
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more