[−]Trait astral::thirdparty::serde::de::IntoDeserializer
Converts an existing value into a Deserializer
from which other values can
be deserialized.
Lifetime
The 'de
lifetime of this trait is the lifetime of data that may be
borrowed from the resulting Deserializer
. See the page Understanding
deserializer lifetimes for a more detailed explanation of these lifetimes.
Example
ⓘThis code runs with edition 2018
use std::str::FromStr; use serde::Deserialize; use serde::de::{value, IntoDeserializer}; #[derive(Deserialize)] enum Setting { On, Off, } impl FromStr for Setting { type Err = value::Error; fn from_str(s: &str) -> Result<Self, Self::Err> { Self::deserialize(s.into_deserializer()) } }
Associated Types
type Deserializer: Deserializer<'de>
The type of the deserializer being converted into.
Required methods
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Implementations on Foreign Types
impl<'de, E> IntoDeserializer<'de, E> for char where
E: Error,
[src]
E: Error,
type Deserializer = CharDeserializer<E>
fn into_deserializer(self) -> CharDeserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for u128 where
E: Error,
[src]
E: Error,
type Deserializer = U128Deserializer<E>
fn into_deserializer(self) -> U128Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for f64 where
E: Error,
[src]
E: Error,
type Deserializer = F64Deserializer<E>
fn into_deserializer(self) -> F64Deserializer<E>
[src]
impl<'de, T, E> IntoDeserializer<'de, E> for BTreeSet<T> where
E: Error,
T: IntoDeserializer<'de, E> + Eq + Ord,
[src]
E: Error,
T: IntoDeserializer<'de, E> + Eq + Ord,
type Deserializer = SeqDeserializer<<BTreeSet<T> as IntoIterator>::IntoIter, E>
fn into_deserializer(
self
) -> <BTreeSet<T> as IntoDeserializer<'de, E>>::Deserializer
[src]
self
) -> <BTreeSet<T> as IntoDeserializer<'de, E>>::Deserializer
impl<'de, T, S, E> IntoDeserializer<'de, E> for HashSet<T, S> where
E: Error,
S: BuildHasher,
T: IntoDeserializer<'de, E> + Eq + Hash,
[src]
E: Error,
S: BuildHasher,
T: IntoDeserializer<'de, E> + Eq + Hash,
type Deserializer = SeqDeserializer<<HashSet<T, S> as IntoIterator>::IntoIter, E>
fn into_deserializer(
self
) -> <HashSet<T, S> as IntoDeserializer<'de, E>>::Deserializer
[src]
self
) -> <HashSet<T, S> as IntoDeserializer<'de, E>>::Deserializer
impl<'de, K, V, S, E> IntoDeserializer<'de, E> for HashMap<K, V, S> where
E: Error,
K: IntoDeserializer<'de, E> + Eq + Hash,
S: BuildHasher,
V: IntoDeserializer<'de, E>,
[src]
E: Error,
K: IntoDeserializer<'de, E> + Eq + Hash,
S: BuildHasher,
V: IntoDeserializer<'de, E>,
type Deserializer = MapDeserializer<'de, <HashMap<K, V, S> as IntoIterator>::IntoIter, E>
fn into_deserializer(
self
) -> <HashMap<K, V, S> as IntoDeserializer<'de, E>>::Deserializer
[src]
self
) -> <HashMap<K, V, S> as IntoDeserializer<'de, E>>::Deserializer
impl<'de, E> IntoDeserializer<'de, E> for bool where
E: Error,
[src]
E: Error,
type Deserializer = BoolDeserializer<E>
fn into_deserializer(self) -> BoolDeserializer<E>
[src]
impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T> where
E: Error,
T: IntoDeserializer<'de, E>,
[src]
E: Error,
T: IntoDeserializer<'de, E>,
type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>
fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer
[src]
impl<'de, E> IntoDeserializer<'de, E> for u8 where
E: Error,
[src]
E: Error,
type Deserializer = U8Deserializer<E>
fn into_deserializer(self) -> U8Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for f32 where
E: Error,
[src]
E: Error,
type Deserializer = F32Deserializer<E>
fn into_deserializer(self) -> F32Deserializer<E>
[src]
impl<'de, 'a, E> IntoDeserializer<'de, E> for Cow<'a, str> where
E: Error,
[src]
E: Error,
type Deserializer = CowStrDeserializer<'a, E>
fn into_deserializer(self) -> CowStrDeserializer<'a, E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for i64 where
E: Error,
[src]
E: Error,
type Deserializer = I64Deserializer<E>
fn into_deserializer(self) -> I64Deserializer<E>
[src]
impl<'de, K, V, E> IntoDeserializer<'de, E> for BTreeMap<K, V> where
E: Error,
K: IntoDeserializer<'de, E> + Eq + Ord,
V: IntoDeserializer<'de, E>,
[src]
E: Error,
K: IntoDeserializer<'de, E> + Eq + Ord,
V: IntoDeserializer<'de, E>,
type Deserializer = MapDeserializer<'de, <BTreeMap<K, V> as IntoIterator>::IntoIter, E>
fn into_deserializer(
self
) -> <BTreeMap<K, V> as IntoDeserializer<'de, E>>::Deserializer
[src]
self
) -> <BTreeMap<K, V> as IntoDeserializer<'de, E>>::Deserializer
impl<'de, E> IntoDeserializer<'de, E> for i16 where
E: Error,
[src]
E: Error,
type Deserializer = I16Deserializer<E>
fn into_deserializer(self) -> I16Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for u32 where
E: Error,
[src]
E: Error,
type Deserializer = U32Deserializer<E>
fn into_deserializer(self) -> U32Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for u64 where
E: Error,
[src]
E: Error,
type Deserializer = U64Deserializer<E>
fn into_deserializer(self) -> U64Deserializer<E>
[src]
impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a str where
E: Error,
[src]
E: Error,
type Deserializer = StrDeserializer<'a, E>
fn into_deserializer(self) -> StrDeserializer<'a, E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for usize where
E: Error,
[src]
E: Error,
type Deserializer = UsizeDeserializer<E>
fn into_deserializer(self) -> UsizeDeserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for () where
E: Error,
[src]
E: Error,
type Deserializer = UnitDeserializer<E>
fn into_deserializer(self) -> UnitDeserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for u16 where
E: Error,
[src]
E: Error,
type Deserializer = U16Deserializer<E>
fn into_deserializer(self) -> U16Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for i8 where
E: Error,
[src]
E: Error,
type Deserializer = I8Deserializer<E>
fn into_deserializer(self) -> I8Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for isize where
E: Error,
[src]
E: Error,
type Deserializer = IsizeDeserializer<E>
fn into_deserializer(self) -> IsizeDeserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for i32 where
E: Error,
[src]
E: Error,
type Deserializer = I32Deserializer<E>
fn into_deserializer(self) -> I32Deserializer<E>
[src]
impl<'de, E> IntoDeserializer<'de, E> for i128 where
E: Error,
[src]
E: Error,
type Deserializer = I128Deserializer<E>
fn into_deserializer(self) -> I128Deserializer<E>
[src]
Implementors
impl<'de, E> IntoDeserializer<'de, E> for String where
E: Error,
[src]
E: Error,