Skip to main content

CuLogCodec

Trait CuLogCodec 

Source
pub trait CuLogCodec<P>: 'static
where P: CuMsgPayload,
{ type Config: DeserializeOwned + Default; // Required methods fn new(config: Self::Config) -> Result<Self, CuError> where Self: Sized; fn encode_payload<E>( &mut self, payload: &P, encoder: &mut E, ) -> Result<(), EncodeError> where E: Encoder; fn decode_payload<D>(&mut self, decoder: &mut D) -> Result<P, DecodeError> where D: Decoder<Context = ()>; }

Required Associated Types§

Required Methods§

Source

fn new(config: Self::Config) -> Result<Self, CuError>
where Self: Sized,

Source

fn encode_payload<E>( &mut self, payload: &P, encoder: &mut E, ) -> Result<(), EncodeError>
where E: Encoder,

Source

fn decode_payload<D>(&mut self, decoder: &mut D) -> Result<P, DecodeError>
where D: Decoder<Context = ()>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§