pub(crate) struct HandlerPair<T: Logger> {
pub(crate) user_defined_handler: Option<Box<dyn Fn(&T) + Send>>,
pub(crate) logging_handler: Option<Box<dyn Fn(&T) + Send>>,
}
Expand description
Stores the two optional handlers enabled for an event type that implements the Logger
trait,
namely one logging handler, defined in logging
, and one user-defined handler,
passed to ReplicaSpec
.
Note that the user-defined handler is expected to include all expected event-handling functionalities per event.
Fields§
§user_defined_handler: Option<Box<dyn Fn(&T) + Send>>
§logging_handler: Option<Box<dyn Fn(&T) + Send>>
Implementations§
source§impl<T: Logger> HandlerPair<T>
impl<T: Logger> HandlerPair<T>
Auto Trait Implementations§
impl<T> Freeze for HandlerPair<T>
impl<T> !RefUnwindSafe for HandlerPair<T>
impl<T> Send for HandlerPair<T>
impl<T> !Sync for HandlerPair<T>
impl<T> Unpin for HandlerPair<T>
impl<T> !UnwindSafe for HandlerPair<T>
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