Trait FramingEncoder

Source
pub trait FramingEncoder:
    Encoder<(), Error = BoxedFramingError>
    + DynClone
    + Debug
    + Send
    + Sync { }
Expand description

Trait for types that can encode bytes with frame boundaries.

This trait is automatically implemented for any encoder that implements tokio_util::codec::Encoder<(), Error = BoxedFramingError> and the required trait bounds. It is primarily used for trait objects via the BoxedFramer type.

Implementors§

Source§

impl<Encoder> FramingEncoder for Encoder
where Encoder: Encoder<(), Error = BoxedFramingError> + Clone + Debug + Send + Sync,

Default implementation of FramingEncoder for any type that implements the required encoder traits.