pub struct AnyChatActionSender { /* private fields */ }Expand description
Type-erased ChatActionSender handle
Cloning shares the underlying sender. This is what the framework stores
and hands to ChatActionGuard; platform ContextData implementations
produce one via AnyChatActionSender::new.
Implementations§
Source§impl AnyChatActionSender
impl AnyChatActionSender
Sourcepub fn new(sender: impl ChatActionSender) -> Self
pub fn new(sender: impl ChatActionSender) -> Self
Erase sender into a shareable handle.
Sourcepub fn send_action(
&self,
action: ChatAction,
) -> impl ChatActionFutureBounds<Output = Result<(), BotError>> + '_
pub fn send_action( &self, action: ChatAction, ) -> impl ChatActionFutureBounds<Output = Result<(), BotError>> + '_
Send a chat action to the channel this sender is bound to
Sourcepub fn action_expiry(&self) -> Duration
pub fn action_expiry(&self) -> Duration
Duration after which the action indicator expires
Sourcepub fn clear_action(
&self,
) -> impl ChatActionFutureBounds<Output = Result<(), BotError>> + '_
pub fn clear_action( &self, ) -> impl ChatActionFutureBounds<Output = Result<(), BotError>> + '_
Clear the indicator early
Trait Implementations§
Source§impl Clone for AnyChatActionSender
impl Clone for AnyChatActionSender
Source§fn clone(&self) -> AnyChatActionSender
fn clone(&self) -> AnyChatActionSender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AnyChatActionSender
impl !UnwindSafe for AnyChatActionSender
impl Freeze for AnyChatActionSender
impl Send for AnyChatActionSender
impl Sync for AnyChatActionSender
impl Unpin for AnyChatActionSender
impl UnsafeUnpin for AnyChatActionSender
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more