Skip to main content

Encodeable

Trait Encodeable 

Source
pub trait Encodeable {
    type Output: Send + Sync;
    type Encoder: Encoder<Message = Self::Output>;

    // Required method
    fn encode(
        self,
        encoder: &mut Self::Encoder,
        stream_id: &Uuid,
        run: Option<&Run>,
    ) -> Option<Self::Output>;
}
Expand description

Implemented by types that can be encoded and sent via SiftStream::send.

The two concrete implementations are Flow and FlowBuilder. The associated Encoder type links each encodeable to the specific encoder implementation that processes it — external types cannot implement this trait because Encoder is sealed.

Required Associated Types§

Source

type Output: Send + Sync

Source

type Encoder: Encoder<Message = Self::Output>

Required Methods§

Source

fn encode( self, encoder: &mut Self::Encoder, stream_id: &Uuid, run: Option<&Run>, ) -> Option<Self::Output>

Implementors§