[][src]Trait janus::Message

pub trait Message: Debug {
    fn payload(&self) -> &[u8];
fn topic(&self) -> &str; fn key(&self) -> Option<&str> { ... } }

Provides a generic abstraction over a message.

Required methods

fn payload(&self) -> &[u8]

Returns the payload of the message.

fn topic(&self) -> &str

Returns the source topic of the message.

Loading content...

Provided methods

fn key(&self) -> Option<&str>

Returns the key of the message, or None if there is no key.

Loading content...

Implementors

Loading content...