Struct nu_json::de::Deserializer[][src]

pub struct Deserializer<Iter: Iterator<Item = u8>> { /* fields omitted */ }

A structure that deserializes Hjson into Rust values.

Implementations

impl<Iter> Deserializer<Iter> where
    Iter: Iterator<Item = u8>, 
[src]

pub fn new(rdr: Iter) -> Deserializer<Iter>[src]

Creates the Hjson parser from an std::iter::Iterator.

pub fn new_for_root(rdr: Iter) -> Deserializer<Iter>[src]

Creates the Hjson parser from an std::iter::Iterator.

pub fn end(&mut self) -> Result<()>[src]

The Deserializer::end method should be called after a value has been fully deserialized. This allows the Deserializer to validate that the input stream is at the end or that it only has trailing whitespace.

Trait Implementations

impl<'de, 'a, Iter> Deserializer<'de> for &'a mut Deserializer<Iter> where
    Iter: Iterator<Item = u8>, 
[src]

type Error = Error

The error type that can be returned if some error occurs during deserialization. Read more

fn deserialize_option<V>(self, visitor: V) -> Result<V::Value> where
    V: Visitor<'de>, 
[src]

Parses a null as a None, and any other values as a Some(...).

fn deserialize_newtype_struct<V>(
    self,
    _name: &str,
    visitor: V
) -> Result<V::Value> where
    V: Visitor<'de>, 
[src]

Parses a newtype struct as the underlying value.

impl<'de, 'a, Iter> VariantAccess<'de> for &'a mut Deserializer<Iter> where
    Iter: Iterator<Item = u8>, 
[src]

type Error = Error

The error type that can be returned if some error occurs during deserialization. Must match the error type of our EnumAccess. Read more

Auto Trait Implementations

impl<Iter> RefUnwindSafe for Deserializer<Iter> where
    Iter: RefUnwindSafe

impl<Iter> Send for Deserializer<Iter> where
    Iter: Send

impl<Iter> Sync for Deserializer<Iter> where
    Iter: Sync

impl<Iter> Unpin for Deserializer<Iter> where
    Iter: Unpin

impl<Iter> UnwindSafe for Deserializer<Iter> where
    Iter: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.