Skip to main content

ChatActionSender

Trait ChatActionSender 

Source
pub trait ChatActionSender: ChatActionSenderBounds + 'static {
    // Required methods
    fn send_action(&self, action: ChatAction) -> ChatActionFuture<'_>;
    fn action_expiry(&self) -> Duration;
    fn clone_boxed(&self) -> Box<dyn ChatActionSender>;
}
Expand description

Trait for sending chat actions to a channel

Platform implementations define how to send actions and their expiration times.

Required Methods§

Source

fn send_action(&self, action: ChatAction) -> ChatActionFuture<'_>

Send a chat action to the specified channel

Source

fn action_expiry(&self) -> Duration

Duration after which the action indicator expires

Used for auto-renewal: renew at 80% of this duration.

Source

fn clone_boxed(&self) -> Box<dyn ChatActionSender>

Clone this sender into a boxed trait object

Implementors§