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§
Sourcefn send_action(&self, action: ChatAction) -> ChatActionFuture<'_>
fn send_action(&self, action: ChatAction) -> ChatActionFuture<'_>
Send a chat action to the specified channel
Sourcefn action_expiry(&self) -> Duration
fn action_expiry(&self) -> Duration
Duration after which the action indicator expires
Used for auto-renewal: renew at 80% of this duration.
Sourcefn clone_boxed(&self) -> Box<dyn ChatActionSender>
fn clone_boxed(&self) -> Box<dyn ChatActionSender>
Clone this sender into a boxed trait object