Expand description

Building blocks for deserializing basic values using the IntoDeserializer trait.

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())
    }
}

Structs

A deserializer holding a bool.
A deserializer holding a &[u8] with a lifetime tied to another deserializer. Always calls Visitor::visit_borrowed_bytes.
A deserializer holding a &str with a lifetime tied to another deserializer.
A deserializer holding a &[u8]. Always calls Visitor::visit_bytes.
A deserializer holding a char.
A deserializer holding a Cow<str>.
A deserializer holding an EnumAccess.
A minimal representation of all possible errors that can occur using the IntoDeserializer trait.
A deserializer holding an f32.
A deserializer holding an f64.
A deserializer holding an i8.
A deserializer holding an i16.
A deserializer holding an i32.
A deserializer holding an i64.
A deserializer holding an i128.
A deserializer holding an isize.
A deserializer holding a MapAccess.
A deserializer that iterates over a map.
A deserializer holding a SeqAccess.
A deserializer that iterates over a sequence.
A deserializer holding a &str.
A deserializer holding a String.
A deserializer holding a u8.
A deserializer holding a u16.
A deserializer holding a u32.
A deserializer holding a u64.
A deserializer holding a u128.
A deserializer holding a ().
A deserializer holding a usize.