#[non_exhaustive]pub enum Event {
Start,
HeartBeat,
Custom(Box<dyn Any + Send + Sync + 'static>),
Success(Box<dyn Any + Send + Sync + 'static>),
Error(Arc<BoxDynError>),
Stop,
Exit,
}Expand description
Events emitted by a worker
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Start
Worker started
HeartBeat
Worker did a heartbeat
Custom(Box<dyn Any + Send + Sync + 'static>)
A custom event
Success(Box<dyn Any + Send + Sync + 'static>)
A result of processing
Error(Arc<BoxDynError>)
Error encountered during processing, would not stop the worker, but would be logged and sent to the event handler
Stop
Worker stopped
Exit
Worker exited, no further processing
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
impl Freeze for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
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