Struct NoopDeSerializer

Source
pub struct NoopDeSerializer<Ok, Err> { /* private fields */ }
Expand description

A serializer that does nothing. This is useful as a sub-type for serializers which only do certain parts of ser::Serializer.

Trait Implementations§

Source§

impl<Ok, Err: Error> SerializeAttributes for NoopDeSerializer<Ok, Err>

Source§

type Ok = Ok

The type of the value that is returned when serialization is successful.
Source§

type Error = Err

The type of the error that is returned when serialization fails.
Source§

fn serialize_attribute<A: SerializeAttribute>( &mut self, _a: &A, ) -> Result<Self::Ok, Self::Error>

Serializes an attribute.
Source§

impl<Ok, Err: Error> SerializeElement for NoopDeSerializer<Ok, Err>

Source§

type Ok = Ok

The type of the value that is returned when serialization is successful.
Source§

type Error = Err

The type of the error that is returned when serialization fails.
Source§

type ChildrenSerializeSeq = NoopDeSerializer<Ok, Err>

The type of the serializer that is returned when serializing the children of this element.
Source§

type SerializeElementAttributes = NoopDeSerializer<Ok, Err>

The type of the serializer that is returned when serializing the attributes of this element.
Source§

fn include_prefix( &mut self, _should_enforce: IncludePrefix, ) -> Result<Self::Ok, Self::Error>

Always serialize this element with the given prefix.
Source§

fn preferred_prefix( &mut self, _preferred_prefix: Option<Prefix<'_>>, ) -> Result<Self::Ok, Self::Error>

Set the preferred prefix for this element.
Source§

fn serialize_attributes( self, ) -> Result<Self::SerializeElementAttributes, Self::Error>

Serialize the attributes of this element.
Source§

fn serialize_children(self) -> Result<Self::ChildrenSerializeSeq, Self::Error>

Serialize the children of this element.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

End the serialization of this element with no children.
Source§

impl<Ok, Err: Error> SerializeElementAttributes for NoopDeSerializer<Ok, Err>

Source§

type ChildrenSerializeSeq = NoopDeSerializer<Ok, Err>

The type of the value that is returned when serialization is successful.
Source§

fn serialize_children(self) -> Result<Self::ChildrenSerializeSeq, Self::Error>

Serialize the children of this element.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

End the serialization of this element with no children.
Source§

impl<Ok, Err: Error> SerializeSeq for NoopDeSerializer<Ok, Err>

Source§

type Ok = Ok

The type of the value that is returned when serialization is successful.
Source§

type Error = Err

The type of the error that is returned when serialization fails.
Source§

fn serialize_element<V: Serialize>( &mut self, _: &V, ) -> Result<Self::Ok, Self::Error>

Serialize an element in the sequence.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

End the serialization of the sequence.

Auto Trait Implementations§

§

impl<Ok, Err> Freeze for NoopDeSerializer<Ok, Err>

§

impl<Ok, Err> RefUnwindSafe for NoopDeSerializer<Ok, Err>
where Ok: RefUnwindSafe, Err: RefUnwindSafe,

§

impl<Ok, Err> Send for NoopDeSerializer<Ok, Err>
where Ok: Send, Err: Send,

§

impl<Ok, Err> Sync for NoopDeSerializer<Ok, Err>
where Ok: Sync, Err: Sync,

§

impl<Ok, Err> Unpin for NoopDeSerializer<Ok, Err>
where Ok: Unpin, Err: Unpin,

§

impl<Ok, Err> UnwindSafe for NoopDeSerializer<Ok, Err>
where Ok: UnwindSafe, 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.