Struct discord_sdk::handlers::Forwarder
source · pub struct Forwarder { /* private fields */ }
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§
source§impl Forwarder
impl Forwarder
pub fn new() -> (Self, UnboundedReceiver<DiscordMsg>)
Trait Implementations§
source§impl DiscordHandler for Forwarder
impl DiscordHandler for Forwarder
Auto Trait Implementations§
impl Freeze for Forwarder
impl RefUnwindSafe for Forwarder
impl Send for Forwarder
impl Sync for Forwarder
impl Unpin for Forwarder
impl UnwindSafe for Forwarder
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