MapVisitor

Struct MapVisitor 

Source
pub struct MapVisitor<'de, V, F, R>
where V: Visitor<'de>, F: FnOnce(V::Value) -> R,
{ /* private fields */ }

Trait Implementations§

Source§

impl<'de, V, F, R: Debug> Debug for MapVisitor<'de, V, F, R>
where V: Visitor<'de> + Debug, F: FnOnce(V::Value) -> R + Debug,

Source§

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

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

impl<'de, V, F, R> Visitor<'de> for MapVisitor<'de, V, F, R>
where V: Visitor<'de>, F: FnOnce(V::Value) -> R,

Source§

type Value = R

Source§

fn visit<D: Decoder<'de>>(self, decoder: D) -> Result<Self::Value, D::Error>

Source§

fn map<F, R>(self, f: F) -> MapVisitor<'de, Self, F, R>
where Self: Sized, F: FnOnce(Self::Value) -> R,

Source§

fn and<A>(self, visitor: A) -> AndVisitor<'de, Self, A>
where Self: Sized, A: Visitor<'de>,

Source§

fn or<A>(self, visitor: A) -> EitherVisitor<'de, Self, A>
where Self: Sized, A: Visitor<'de>,

Auto Trait Implementations§

§

impl<'de, V, F, R> Freeze for MapVisitor<'de, V, F, R>
where V: Freeze, F: Freeze,

§

impl<'de, V, F, R> RefUnwindSafe for MapVisitor<'de, V, F, R>

§

impl<'de, V, F, R> Send for MapVisitor<'de, V, F, R>
where V: Send, F: Send, R: Sync,

§

impl<'de, V, F, R> Sync for MapVisitor<'de, V, F, R>
where V: Sync, F: Sync, R: Sync,

§

impl<'de, V, F, R> Unpin for MapVisitor<'de, V, F, R>
where V: Unpin, F: Unpin,

§

impl<'de, V, F, R> UnwindSafe for MapVisitor<'de, V, F, R>

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.