Struct nakadion::handler::HandlerFn [−][src]
pub struct HandlerFn<F>(pub F);
Expand description
Simple wrapper for BatchHandlers
from closures
Tuple Fields
0: F
Trait Implementations
impl<F> BatchHandler for HandlerFn<F> where
F: for<'a> FnMut(Bytes, BatchMeta<'a>) -> BatchHandlerFuture<'a> + Send,
impl<F> BatchHandler for HandlerFn<F> where
F: for<'a> FnMut(Bytes, BatchMeta<'a>) -> BatchHandlerFuture<'a> + Send,
Handle a batch of bytes
fn on_inactive(
&mut self,
_inactive_for: Duration,
_last_activity: Instant
) -> InactivityAnswer
fn on_inactive(
&mut self,
_inactive_for: Duration,
_last_activity: Instant
) -> InactivityAnswer
Periodically called if there were no events for a given time. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for HandlerFn<F> where
F: RefUnwindSafe,
impl<F> UnwindSafe for HandlerFn<F> where
F: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more