[][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

Implementations

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

Auto Trait Implementations

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

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

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

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

impl<D> UnwindSafe for Deserializer<D> where
    D: 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.