pub struct Handler {
pub check_update: Arc<dyn Fn(&Update) -> bool + Send + Sync>,
pub callback: HandlerCallback,
pub block: bool,
}Expand description
A registered handler: the check_update predicate + callback + blocking flag.
Fields§
§check_update: Arc<dyn Fn(&Update) -> bool + Send + Sync>Predicate that determines whether this handler matches an update.
callback: HandlerCallbackThe async callback invoked when the handler matches.
block: boolIf true, the application awaits this handler before moving to the next group.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handler
impl !RefUnwindSafe for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl UnsafeUnpin for Handler
impl !UnwindSafe for Handler
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