pub struct MapAccess<'a, R, K, V> { /* private fields */ }
Expand description

Deserializer for map elements.

Trait Implementations§

source§

impl<'de, 'a, R: BufReader<'de>, K: DeserializeSeed<'de> + Clone, V: DeserializeSeed<'de> + Clone> MapAccess<'de> for MapAccess<'a, R, K, V>

§

type Key = <K as DeserializeSeed<'de>>::Output

The key type of the map.
§

type Value = <V as DeserializeSeed<'de>>::Output

The value type of the map.
§

type Error = DecodeError

The error type that can be returned if some error occurs during deserialization.
source§

fn next_entry( &mut self ) -> Result<Option<(Self::Key, Self::Value)>, Self::Error>

This returns Ok(Some((key, value))) for the next (key-value) pair in the map, or Ok(None) if there are no more remaining items.
source§

fn size_hint(&self) -> Option<usize>

Returns the number of elements remaining in the map, if known.

Auto Trait Implementations§

§

impl<'a, R, K, V> RefUnwindSafe for MapAccess<'a, R, K, V>

§

impl<'a, R, K, V> Send for MapAccess<'a, R, K, V>
where K: Send, R: Send, V: Send,

§

impl<'a, R, K, V> Sync for MapAccess<'a, R, K, V>
where K: Sync, R: Sync, V: Sync,

§

impl<'a, R, K, V> Unpin for MapAccess<'a, R, K, V>
where K: Unpin, V: Unpin,

§

impl<'a, R, K, V> !UnwindSafe for MapAccess<'a, R, K, V>

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<'de, A> ArrayAccess<'de> for A
where A: MapAccess<'de>,

§

type Element = (<A as MapAccess<'de>>::Key, <A as MapAccess<'de>>::Value)

The element / base type of the array.
§

type Error = <A as MapAccess<'de>>::Error

The error type that can be returned if some error occurs during deserialization.
source§

fn next_element( &mut self ) -> Result<Option<<A as ArrayAccess<'de>>::Element>, <A as ArrayAccess<'de>>::Error>

This returns Ok(Some(value)) for the next element in the array, or Ok(None) if there are no more remaining elements.
source§

fn size_hint(&self) -> Option<usize>

Returns the number of elements remaining in the array, if known.
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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more