pub trait DiscordExt:
Sized
+ Send
+ Syncwhere
Self: 'static,{
// Required method
fn into_discord_bot(
self,
token: &str,
) -> impl Future<Output = Result<Client, DiscordBotError>> + Send;
// Provided method
fn into_discord_bot_from_env(
self,
) -> impl Future<Output = Result<Client, DiscordBotError>> + Send { ... }
}Available on crate feature
discord-bot only.Expand description
A trait for turning a type into a serenity client.
Required Methods§
fn into_discord_bot( self, token: &str, ) -> impl Future<Output = Result<Client, DiscordBotError>> + Send
Provided Methods§
fn into_discord_bot_from_env( self, ) -> impl Future<Output = Result<Client, DiscordBotError>> + Send
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.