[−][src]Struct serde_test::Serializer
Implementations
impl<'a, I> Serializer<'a, I> where
I: Iterator<Item = &'a Token<'a>>,
[src]
I: Iterator<Item = &'a Token<'a>>,
pub fn new(tokens: I) -> Serializer<'a, I>
[src]
pub fn next_token(&mut self) -> Option<&'a Token<'a>>
[src]
Trait Implementations
impl<'a, I> Serializer for Serializer<'a, I> where
I: Iterator<Item = &'a Token<'a>>,
[src]
I: Iterator<Item = &'a Token<'a>>,
type Error = Error
The error type that can be returned if some error occurs during serialization.
type MapState = ()
A state object that is initialized by serialize_map
, passed to
serialize_map_elt
, and consumed by serialize_map_end
. Use ()
if no
state is required. Read more
type SeqState = ()
A state object that is initialized by serialize_seq
, passed to
serialize_seq_elt
, and consumed by serialize_seq_end
. Use ()
if no
state is required. Read more
type TupleState = ()
A state object that is initialized by serialize_tuple
, passed to
serialize_tuple_elt
, and consumed by serialize_tuple_end
. Use ()
if no state is required. Read more
type TupleStructState = ()
A state object that is initialized by serialize_tuple_struct
, passed
to serialize_tuple_struct_elt
, and consumed by
serialize_tuple_struct_end
. Use ()
if no state is required. Read more
type TupleVariantState = ()
A state object that is initialized by serialize_tuple_variant
, passed
to serialize_tuple_variant_elt
, and consumed by
serialize_tuple_variant_end
. Use ()
if no state is required. Read more
type StructState = ()
A state object that is initialized by serialize_struct
, passed to
serialize_struct_elt
, and consumed by serialize_struct_end
. Use ()
if no state is required. Read more
type StructVariantState = ()
A state object that is initialized by serialize_struct_variant
, passed
to serialize_struct_variant_elt
, and consumed by
serialize_struct_variant_end
. Use ()
if no state is required. Read more
fn serialize_unit(&mut self) -> Result<(), Error>
[src]
fn serialize_newtype_variant<T>(
&mut self,
name: &str,
_variant_index: usize,
variant: &str,
value: T
) -> Result<(), Error> where
T: Serialize,
[src]
&mut self,
name: &str,
_variant_index: usize,
variant: &str,
value: T
) -> Result<(), Error> where
T: Serialize,
fn serialize_unit_struct(&mut self, name: &str) -> Result<(), Error>
[src]
fn serialize_unit_variant(
&mut self,
name: &str,
_variant_index: usize,
variant: &str
) -> Result<(), Error>
[src]
&mut self,
name: &str,
_variant_index: usize,
variant: &str
) -> Result<(), Error>
fn serialize_bool(&mut self, v: bool) -> Result<(), Error>
[src]
fn serialize_isize(&mut self, v: isize) -> Result<(), Error>
[src]
fn serialize_i8(&mut self, v: i8) -> Result<(), Error>
[src]
fn serialize_i16(&mut self, v: i16) -> Result<(), Error>
[src]
fn serialize_i32(&mut self, v: i32) -> Result<(), Error>
[src]
fn serialize_i64(&mut self, v: i64) -> Result<(), Error>
[src]
fn serialize_usize(&mut self, v: usize) -> Result<(), Error>
[src]
fn serialize_u8(&mut self, v: u8) -> Result<(), Error>
[src]
fn serialize_u16(&mut self, v: u16) -> Result<(), Error>
[src]
fn serialize_u32(&mut self, v: u32) -> Result<(), Error>
[src]
fn serialize_u64(&mut self, v: u64) -> Result<(), Error>
[src]
fn serialize_f32(&mut self, v: f32) -> Result<(), Error>
[src]
fn serialize_f64(&mut self, v: f64) -> Result<(), Error>
[src]
fn serialize_char(&mut self, v: char) -> Result<(), Error>
[src]
fn serialize_str(&mut self, v: &str) -> Result<(), Error>
[src]
fn serialize_none(&mut self) -> Result<(), Error>
[src]
fn serialize_some<V>(&mut self, value: V) -> Result<(), Error> where
V: Serialize,
[src]
V: Serialize,
fn serialize_seq<'b>(&'b mut self, len: Option<usize>) -> Result<(), Error>
[src]
fn serialize_seq_elt<T>(&mut self, _: &mut (), value: T) -> Result<(), Error> where
T: Serialize,
[src]
T: Serialize,
fn serialize_seq_end(&mut self, _: ()) -> Result<(), Error>
[src]
fn serialize_seq_fixed_size(&mut self, len: usize) -> Result<(), Error>
[src]
fn serialize_tuple(&mut self, len: usize) -> Result<(), Error>
[src]
fn serialize_tuple_elt<T>(&mut self, _: &mut (), value: T) -> Result<(), Error> where
T: Serialize,
[src]
T: Serialize,
fn serialize_tuple_end(&mut self, _: ()) -> Result<(), Error>
[src]
fn serialize_newtype_struct<T>(
&mut self,
name: &'static str,
value: T
) -> Result<(), Error> where
T: Serialize,
[src]
&mut self,
name: &'static str,
value: T
) -> Result<(), Error> where
T: Serialize,
fn serialize_tuple_struct(
&mut self,
name: &'static str,
len: usize
) -> Result<(), Error>
[src]
&mut self,
name: &'static str,
len: usize
) -> Result<(), Error>
fn serialize_tuple_struct_elt<T>(
&mut self,
_: &mut (),
value: T
) -> Result<(), Error> where
T: Serialize,
[src]
&mut self,
_: &mut (),
value: T
) -> Result<(), Error> where
T: Serialize,
fn serialize_tuple_struct_end(&mut self, _: ()) -> Result<(), Error>
[src]
fn serialize_tuple_variant(
&mut self,
name: &str,
_variant_index: usize,
variant: &str,
len: usize
) -> Result<(), Error>
[src]
&mut self,
name: &str,
_variant_index: usize,
variant: &str,
len: usize
) -> Result<(), Error>
fn serialize_tuple_variant_elt<T>(
&mut self,
_: &mut (),
value: T
) -> Result<(), Error> where
T: Serialize,
[src]
&mut self,
_: &mut (),
value: T
) -> Result<(), Error> where
T: Serialize,
fn serialize_tuple_variant_end(&mut self, _: ()) -> Result<(), Error>
[src]
fn serialize_map(&mut self, len: Option<usize>) -> Result<(), Error>
[src]
fn serialize_map_key<T>(
&mut self,
_: &mut (),
key: T
) -> Result<(), Self::Error> where
T: Serialize,
[src]
&mut self,
_: &mut (),
key: T
) -> Result<(), Self::Error> where
T: Serialize,
fn serialize_map_value<T>(
&mut self,
_: &mut (),
value: T
) -> Result<(), Self::Error> where
T: Serialize,
[src]
&mut self,
_: &mut (),
value: T
) -> Result<(), Self::Error> where
T: Serialize,
fn serialize_map_end(&mut self, _: ()) -> Result<(), Self::Error>
[src]
fn serialize_struct(&mut self, name: &str, len: usize) -> Result<(), Error>
[src]
fn serialize_struct_elt<V>(
&mut self,
_: &mut (),
key: &'static str,
value: V
) -> Result<(), Self::Error> where
V: Serialize,
[src]
&mut self,
_: &mut (),
key: &'static str,
value: V
) -> Result<(), Self::Error> where
V: Serialize,
fn serialize_struct_end(&mut self, _: ()) -> Result<(), Self::Error>
[src]
fn serialize_struct_variant(
&mut self,
name: &str,
_variant_index: usize,
variant: &str,
len: usize
) -> Result<(), Error>
[src]
&mut self,
name: &str,
_variant_index: usize,
variant: &str,
len: usize
) -> Result<(), Error>
fn serialize_struct_variant_elt<V>(
&mut self,
_: &mut (),
key: &'static str,
value: V
) -> Result<(), Self::Error> where
V: Serialize,
[src]
&mut self,
_: &mut (),
key: &'static str,
value: V
) -> Result<(), Self::Error> where
V: Serialize,
fn serialize_struct_variant_end(&mut self, _: ()) -> Result<(), Self::Error>
[src]
fn serialize_bytes(&mut self, value: &[u8]) -> Result<(), Self::Error>
[src]
Auto Trait Implementations
impl<'a, I> RefUnwindSafe for Serializer<'a, I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<'a, I> Send for Serializer<'a, I> where
I: Send,
I: Send,
impl<'a, I> Sync for Serializer<'a, I> where
I: Sync,
I: Sync,
impl<'a, I> Unpin for Serializer<'a, I> where
I: Unpin,
I: Unpin,
impl<'a, I> UnwindSafe for Serializer<'a, I> where
I: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,