Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder: Send + Sync {
    // Required method
    fn decode_stream<'life0, 'async_trait>(
        &'life0 self,
        input: Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Value, Error>> + Send>>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Decoder trait for stream decoding

Required Methods§

Source

fn decode_stream<'life0, 'async_trait>( &'life0 self, input: Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Value, Error>> + Send>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Decode a byte stream into JSON values

Implementors§