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§
Required Methods§
fn encode( self, encoder: &mut Self::Encoder, stream_id: &Uuid, run: Option<&Run>, ) -> Option<Self::Output>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".