[][src]Struct serde_stacker::Deserializer

pub struct Deserializer<D> {
    pub de: D,
    pub red_zone: usize,
    pub stack_size: usize,
}

Deserializer adapter that avoids stack overflows by dynamically growing the stack.

At each level of nested deserialization, the adapter will check whether it is within red_zone bytes of the end of the stack. If so, it will allocate a new stack of size stack_size on which to continue deserialization.

Fields

de: Dred_zone: usizestack_size: usize

Methods

impl<D> Deserializer<D>
[src]

pub fn new(deserializer: D) -> Self
[src]

Build a deserializer adapter with reasonable default red_zone (64 KB) and stack_size (2 MB).

Trait Implementations

impl<'de, D> Deserializer<'de> for Deserializer<D> where
    D: Deserializer<'de>, 
[src]

type Error = D::Error

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

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

Hint that the Deserialize type is expecting an i128 value. Read more

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

Hint that the Deserialize type is expecting an u128 value. Read more

fn is_human_readable(&self) -> bool
[src]

Determine whether Deserialize implementations should expect to deserialize their human-readable form. Read more

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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