Trait PubSubEncoder

Source
pub trait PubSubEncoder:
    Send
    + Sync
    + Sized {
    // Required method
    fn encode(&self, record: &Record<'_>) -> Vec<u8> ;
}
Expand description

Trait for encoding log messages to be published to a pub/sub channel.

Required Methods§

Source

fn encode(&self, record: &Record<'_>) -> Vec<u8>

Encodes the given log::Record into a byte vector.

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§

Source§

impl PubSubEncoder for DefaultPubSubEncoder

Available on crate feature default_encoders only.