Trait destream::de::ArrayAccess

source ·
pub trait ArrayAccess<T>: Send {
    type Error: Error;

    // Required method
    fn buffer<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        buffer: &'life1 mut [T]
    ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Provides a Visitor with access to an array of type T.

This is a trait that a Decoder passes to a Visitor implementation.

Required Associated Types§

Required Methods§

source

fn buffer<'life0, 'life1, 'async_trait>( &'life0 mut self, buffer: &'life1 mut [T] ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write array values from the stream being decoded into the given buffer.

Returns the number of values written (this will be in the range 0..buffer.len()).

Implementors§