Skip to main content

MessageLike

Trait MessageLike 

Source
pub trait MessageLike {
    // Required methods
    fn sender_user_id(&self) -> Option<i64>;
    fn chat_id(&self) -> i64;
}
Expand description

Minimal view of an incoming message needed to build a StateKey.

Implement this for your message type in the consumer crate so that StateKey::from_message can work without a direct dependency on ferogram itself.

Required Methods§

Source

fn sender_user_id(&self) -> Option<i64>

Source

fn chat_id(&self) -> i64

Implementors§