Skip to main content

Skip

Struct Skip 

Source
pub struct Skip<Err>(/* private fields */);
Expand description

Helper type for implementing a Serializer that skips serializing one of the element types.

Implementations§

Source§

impl<Err> Skip<Err>

Source

pub const fn new() -> Self

Creates a new skip helper.

Trait Implementations§

Source§

impl<Err> Debug for Skip<Err>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Err> Default for Skip<Err>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<Err> Serializer for Skip<Err>
where Err: Error,

Source§

const FLAT_CLASSES: bool = false

Whether inner classes should be flattened.
Source§

type Error = Err

The error type.
Source§

type SerializeClass<'a> = Skip<Err> where Self: 'a

Type returned from Serializer::serialize_class for class content serialization.
Source§

type SerializeField<'a> = Skip<Err> where Self: 'a

Type returned from Serializer::serialize_field for field comment serialization.
Source§

type SerializeMethod<'a> = Skip<Err> where Self: 'a

Type returned from Serializer::serialize_method for method arguments, variables and comment serialization.
Source§

type SerializeMethodArg<'a> = Skip<Err> where Self: 'a

Type returned from Serializer::serialize_method_arg for method argument comment serialization.
Source§

type SerializeMethodVar<'a> = Skip<Err> where Self: 'a

Type returned from Serializer::serialize_method_var for method variable comment serialization.
Source§

fn layout_matches<'de, D>() -> bool
where D: Deserializer<'de> + ?Sized,

Whether the deserializer’s class layout matches this serializer’s class layout. Read more
Source§

fn serialize_comment(&mut self, _value: &str) -> Result<(), Self::Error>

Serializes a comment literal.
Source§

fn serialize_class<Dst>( &mut self, _src: &str, _dst: Dst, ) -> Result<Self::SerializeClass<'_>, Self::Error>
where Dst: IntoIterator<Item: AsRef<str>>,

Serializes a class.
Source§

fn serialize_field<Dst, DstDesc>( &mut self, _src: &str, _desc: Option<&str>, _dst: Dst, _dst_desc: Option<DstDesc>, ) -> Result<Self::SerializeField<'_>, Self::Error>
where Dst: IntoIterator<Item: AsRef<str>>, DstDesc: IntoIterator<Item: AsRef<str>>,

Serializes a field.
Source§

fn serialize_method<Dst, DstDesc>( &mut self, _src: &str, _desc: Option<&str>, _dst: Dst, _dst_desc: Option<DstDesc>, ) -> Result<Self::SerializeMethod<'_>, Self::Error>
where Dst: IntoIterator<Item: AsRef<str>>, DstDesc: IntoIterator<Item: AsRef<str>>,

Serializes a method.
Source§

fn serialize_method_arg<Dst>( &mut self, _src: Option<&str>, _dst: Option<Dst>, _pos: Option<usize>, _lv_index: Option<usize>, ) -> Result<Self::SerializeMethodArg<'_>, Self::Error>
where Dst: IntoIterator<Item: AsRef<str>>,

Serializes a method argument.
Source§

fn serialize_method_var<Dst>( &mut self, _src: Option<&str>, _dst: Option<Dst>, _lv_index: Option<usize>, _lvt_row_index: Option<usize>, _op_idx: Option<(usize, Option<usize>)>, ) -> Result<Self::SerializeMethodVar<'_>, Self::Error>
where Dst: IntoIterator<Item: AsRef<str>>,

Serializes a method variable.

Auto Trait Implementations§

§

impl<Err> Freeze for Skip<Err>
where PhantomData<Err>: Freeze,

§

impl<Err> RefUnwindSafe for Skip<Err>

§

impl<Err> Send for Skip<Err>
where PhantomData<Err>: Send,

§

impl<Err> Sync for Skip<Err>
where PhantomData<Err>: Sync,

§

impl<Err> Unpin for Skip<Err>
where PhantomData<Err>: Unpin,

§

impl<Err> UnsafeUnpin for Skip<Err>

§

impl<Err> UnwindSafe for Skip<Err>
where PhantomData<Err>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.