struct RobjSerializer {
robj: Option<Robj>,
}Fields§
§robj: Option<Robj>Trait Implementations§
Source§impl<'a> Serializer for &'a mut RobjSerializer
impl<'a> Serializer for &'a mut RobjSerializer
Source§fn serialize_none(self) -> Result<()>
fn serialize_none(self) -> Result<()>
None of an option is NULL.
Source§fn serialize_unit_variant(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
) -> Result<()>
fn serialize_unit_variant( self, _name: &'static str, _variant_index: u32, variant: &'static str, ) -> Result<()>
Unit variant: Enum::Name
Source§fn serialize_newtype_struct<T>(
self,
_name: &'static str,
value: &T,
) -> Result<()>
fn serialize_newtype_struct<T>( self, _name: &'static str, value: &T, ) -> Result<()>
Wrapper struct: Wrap(T)
Source§fn serialize_newtype_variant<T>(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
value: &T,
) -> Result<()>
fn serialize_newtype_variant<T>( self, _name: &'static str, _variant_index: u32, variant: &'static str, value: &T, ) -> Result<()>
Wrapper struct in enum: Enum::Wrap(T)
Source§fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq>
fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq>
Start of a vector or other sequence.
Source§fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple>
fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple>
Start of a tuple.
Source§fn serialize_tuple_struct(
self,
_name: &'static str,
len: usize,
) -> Result<Self::SerializeTupleStruct>
fn serialize_tuple_struct( self, _name: &'static str, len: usize, ) -> Result<Self::SerializeTupleStruct>
Start of a tuple struct eg. Point(i32, i32).
Source§fn serialize_tuple_variant(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
len: usize,
) -> Result<Self::SerializeTupleVariant>
fn serialize_tuple_variant( self, _name: &'static str, _variant_index: u32, variant: &'static str, len: usize, ) -> Result<Self::SerializeTupleVariant>
Start of a struct variant eg. Enum::Point{ x: i32, y: i32}.
Source§fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap>
fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap>
Start of a map. We require that keys must be strings.
Source§fn serialize_struct(
self,
_name: &'static str,
len: usize,
) -> Result<Self::SerializeStruct>
fn serialize_struct( self, _name: &'static str, len: usize, ) -> Result<Self::SerializeStruct>
Start of a struct. Collect just the values in a list.
Source§fn serialize_struct_variant(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
_len: usize,
) -> Result<Self::SerializeStructVariant>
fn serialize_struct_variant( self, _name: &'static str, _variant_index: u32, variant: &'static str, _len: usize, ) -> Result<Self::SerializeStructVariant>
eg. Enum::Point { x: i32, y: i32 }
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 SerializeSeq = SerializeSeq<'a>
type SerializeSeq = SerializeSeq<'a>
Type returned from
serialize_seq for serializing the content of the
sequence.Source§type SerializeTuple = SerializeTuple<'a>
type SerializeTuple = SerializeTuple<'a>
Type returned from
serialize_tuple for serializing the content of
the tuple.Source§type SerializeTupleStruct = SerializeTupleStruct<'a>
type SerializeTupleStruct = SerializeTupleStruct<'a>
Type returned from
serialize_tuple_struct for serializing the
content of the tuple struct.Source§type SerializeTupleVariant = SerializeTupleVariant<'a>
type SerializeTupleVariant = SerializeTupleVariant<'a>
Type returned from
serialize_tuple_variant for serializing the
content of the tuple variant.Source§type SerializeMap = SerializeMap<'a>
type SerializeMap = SerializeMap<'a>
Type returned from
serialize_map for serializing the content of the
map.Source§type SerializeStruct = SerializeStruct<'a>
type SerializeStruct = SerializeStruct<'a>
Type returned from
serialize_struct for serializing the content of
the struct.Source§type SerializeStructVariant = SerializeStructVariant<'a>
type SerializeStructVariant = SerializeStructVariant<'a>
Type returned from
serialize_struct_variant for serializing the
content of the struct variant.Source§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 Freeze for RobjSerializer
impl RefUnwindSafe for RobjSerializer
impl !Send for RobjSerializer
impl !Sync for RobjSerializer
impl Unpin for RobjSerializer
impl UnwindSafe for RobjSerializer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more