pub enum Event<'a> {
Command(&'a str),
Button(&'a str),
Message,
}Expand description
An incoming event, resolved to the shape the router dispatches on
Adapters translate their platform payload into one of these and hand it to
BotBuilder::route.
Variants§
Command(&'a str)
A command invocation, by command name (without any prefix or slash)
Button(&'a str)
A button press / callback, by its custom id
Message
A plain message that is not a command
Trait Implementations§
impl<'a> Copy for Event<'a>
impl<'a> Eq for Event<'a>
impl<'a> StructuralPartialEq for Event<'a>
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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