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.