pub struct Router<S> { /* private fields */ }Implementations§
source§impl<S: Clone> Router<S>
impl<S: Clone> Router<S>
sourcepub fn add_chat_handler(&mut self, h: impl Into<Handler<S>>)
pub fn add_chat_handler(&mut self, h: impl Into<Handler<S>>)
Add a handler for all messages in a chat. The handler is called with current state of the chat ID.
sourcepub fn add_query_handler(&mut self, h: impl Into<Handler<S>>)
pub fn add_query_handler(&mut self, h: impl Into<Handler<S>>)
Add a handler for all queries. The handler is called with current state of the user ID.
Auto Trait Implementations§
impl<S> !RefUnwindSafe for Router<S>
impl<S> Send for Router<S>where S: Send,
impl<S> Sync for Router<S>where S: Sync,
impl<S> Unpin for Router<S>where S: Unpin,
impl<S> !UnwindSafe for Router<S>
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