Trait destream::en::EncodeTuple

source ·
pub trait EncodeTuple<'en> {
    type Ok: Stream + Send + Unpin + 'en;
    type Error: Error + Send + Unpin + 'en;

    // Required methods
    fn encode_element<V: IntoStream<'en> + 'en>(
        &mut self,
        value: V
    ) -> Result<(), Self::Error>;
    fn end(self) -> Result<Self::Ok, Self::Error>;
}
Expand description

Returned from Encoder::encode_tuple.

Required Associated Types§

source

type Ok: Stream + Send + Unpin + 'en

Must match the Ok type of the parent Encoder.

source

type Error: Error + Send + Unpin + 'en

Must match the Error type of the parent Encoder.

Required Methods§

source

fn encode_element<V: IntoStream<'en> + 'en>( &mut self, value: V ) -> Result<(), Self::Error>

Encode the next element in the tuple.

source

fn end(self) -> Result<Self::Ok, Self::Error>

Finish encoding the tuple.

Object Safety§

This trait is not object safe.

Implementors§