Skip to main content

OutboundMessage

Trait OutboundMessage 

Source
pub trait OutboundMessage: Clone + Send {
    // Required methods
    fn channel(&self) -> &str;
    fn chat_id(&self) -> &str;
    fn content(&self) -> &str;

    // Provided method
    fn routing_key(&self) -> String { ... }
}
Expand description

Trait for outbound messages

Required Methods§

Source

fn channel(&self) -> &str

Get the target channel

Source

fn chat_id(&self) -> &str

Get the target chat ID

Source

fn content(&self) -> &str

Get the message content

Provided Methods§

Source

fn routing_key(&self) -> String

Build a routing key from this message

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§