pub trait Bot: Sized + Send {
// Required method
fn run(self) -> impl Future<Output = Result<BotHandle, BotError>> + Send;
}Expand description
Unified Bot trait that hides connection mode differences
Both Discord (WebSocket) and Telegram (HTTP webhook) bots implement this trait, providing a consistent API regardless of the underlying transport mechanism.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".