pub trait ChatActionLoopBotExt: Sealed {
// Required method
fn send_chat_action_in_loop<'a>(
&self,
chat_id: impl ImplicitChatId<'a>,
action: Action,
) -> BoxFuture<'a, Result<Infallible, MethodCall>>;
}
Expand description
An utility trait for Bot
with a method to send a chat action in a loop.
Required Methods§
Sourcefn send_chat_action_in_loop<'a>(
&self,
chat_id: impl ImplicitChatId<'a>,
action: Action,
) -> BoxFuture<'a, Result<Infallible, MethodCall>>
fn send_chat_action_in_loop<'a>( &self, chat_id: impl ImplicitChatId<'a>, action: Action, ) -> BoxFuture<'a, Result<Infallible, MethodCall>>
Sends a chat action in an infinite loop, returning only if failed to send the action.
This utility is suppoed to be select!
ed with another future.
As soon as the other future completes, this future is dropped
and the chat action is no longer sent.
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.