Struct skua::gateway::CollectorCallback
source · pub struct CollectorCallback(pub Box<dyn Fn(&Event) -> bool + Send + Sync>);
Available on crate feature
gateway
only.Expand description
Newtype around a callback that will be called on every incoming request. As long as this
collector should still receive events, it should return true
. Once it returns false
, it is
removed.
Tuple Fields§
§0: Box<dyn Fn(&Event) -> bool + Send + Sync>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CollectorCallback
impl Send for CollectorCallback
impl Sync for CollectorCallback
impl Unpin for CollectorCallback
impl !UnwindSafe for CollectorCallback
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