Trait destream::de::FromStream[][src]

pub trait FromStream: Send + Sized {
    type Context: Send;
#[must_use]    fn from_stream<'life0, 'async_trait, D: Decoder>(
        context: Self::Context,
        decoder: &'life0 mut D
    ) -> Pin<Box<dyn Future<Output = Result<Self, D::Error>> + Send + 'async_trait>>
    where
        D: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; }

This trait describes a value which can be decoded from a stream.

Based on serde::de::Deserialize.

Associated Types

type Context: Send[src]

The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory.

Types intended to be stored entirely in main memory should use the unit context ().

Loading content...

Required methods

#[must_use]fn from_stream<'life0, 'async_trait, D: Decoder>(
    context: Self::Context,
    decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self, D::Error>> + Send + 'async_trait>> where
    D: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Parse this value using the given Decoder.

Loading content...

Implementations on Foreign Types

impl FromStream for bool[src]

type Context = ()

impl FromStream for i8[src]

type Context = ()

impl FromStream for i16[src]

type Context = ()

impl FromStream for i32[src]

type Context = ()

impl FromStream for i64[src]

type Context = ()

impl FromStream for u8[src]

type Context = ()

impl FromStream for u16[src]

type Context = ()

impl FromStream for u32[src]

type Context = ()

impl FromStream for u64[src]

type Context = ()

impl FromStream for f32[src]

type Context = ()

impl FromStream for f64[src]

type Context = ()

impl FromStream for String[src]

type Context = ()

impl FromStream for isize[src]

type Context = ()

impl FromStream for usize[src]

type Context = ()

impl FromStream for Bytes[src]

type Context = ()

impl<T: FromStream> FromStream for Option<T>[src]

type Context = T::Context

impl<T: Send + ?Sized> FromStream for PhantomData<T>[src]

type Context = ()

impl<T> FromStream for BinaryHeap<T> where
    T: FromStream + Ord,
    T::Context: Copy
[src]

type Context = T::Context

impl<T> FromStream for BTreeSet<T> where
    T: FromStream + Eq + Ord,
    T::Context: Copy
[src]

type Context = T::Context

impl<T> FromStream for LinkedList<T> where
    T: FromStream,
    T::Context: Copy
[src]

type Context = T::Context

impl<T, S> FromStream for HashSet<T, S> where
    T: FromStream + Eq + Hash,
    S: BuildHasher + Default + Send,
    T::Context: Copy
[src]

type Context = T::Context

impl<T> FromStream for VecDeque<T> where
    T: FromStream,
    T::Context: Copy
[src]

type Context = T::Context

impl<T> FromStream for Vec<T> where
    T: FromStream,
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 0][src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 1] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 2] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 3] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 4] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 5] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 6] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 7] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 8] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 9] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 10] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 11] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 12] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 13] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 14] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 15] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 16] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 17] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 18] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 19] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 20] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 21] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 22] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 23] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 24] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 25] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 26] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 27] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 28] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 29] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 30] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 31] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T: FromStream> FromStream for [T; 32] where
    T::Context: Copy
[src]

type Context = T::Context

impl<T0: FromStream<Context = ()>> FromStream for (T0,)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>> FromStream for (T0, T1)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>> FromStream for (T0, T1, T2)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>, T10: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>, T10: FromStream<Context = ()>, T11: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>, T10: FromStream<Context = ()>, T11: FromStream<Context = ()>, T12: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>, T10: FromStream<Context = ()>, T11: FromStream<Context = ()>, T12: FromStream<Context = ()>, T13: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>, T10: FromStream<Context = ()>, T11: FromStream<Context = ()>, T12: FromStream<Context = ()>, T13: FromStream<Context = ()>, T14: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)[src]

type Context = ()

impl<T0: FromStream<Context = ()>, T1: FromStream<Context = ()>, T2: FromStream<Context = ()>, T3: FromStream<Context = ()>, T4: FromStream<Context = ()>, T5: FromStream<Context = ()>, T6: FromStream<Context = ()>, T7: FromStream<Context = ()>, T8: FromStream<Context = ()>, T9: FromStream<Context = ()>, T10: FromStream<Context = ()>, T11: FromStream<Context = ()>, T12: FromStream<Context = ()>, T13: FromStream<Context = ()>, T14: FromStream<Context = ()>, T15: FromStream<Context = ()>> FromStream for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)[src]

type Context = ()

impl<K, V> FromStream for BTreeMap<K, V> where
    K: FromStream<Context = ()> + Ord,
    V: FromStream<Context = ()>, 
[src]

type Context = ()

impl<K, V, S> FromStream for HashMap<K, V, S> where
    K: FromStream<Context = ()> + Eq + Hash,
    V: FromStream<Context = ()>,
    S: BuildHasher + Default + Send
[src]

type Context = ()

impl FromStream for ()[src]

type Context = ()

Loading content...

Implementors

Loading content...