Struct discord_sdk::handlers::Forwarder [−][src]
pub struct Forwarder { /* fields omitted */ }
Expand description
Forwards messages to a receiver
use discord_sdk as ds;
let (forwarder, mut events) = ds::handlers::Forwarder::new();
let discord = ds::Discord::new(ds::DiscordApp::PlainId(1), ds::Subscriptions::ALL, Box::new(forwarder)).unwrap();
Implementations
Trait Implementations
fn on_message<'life0, 'async_trait>(
&'life0 self,
msg: DiscordMsg
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn on_message<'life0, 'async_trait>(
&'life0 self,
msg: DiscordMsg
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for Forwarder
impl !UnwindSafe for Forwarder
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more