pub enum Event {
Exited {
pid: Pid,
reason: ExitReason,
},
Restarted {
pid: Pid,
},
GaveUp {
pid: Pid,
restarts: usize,
},
Blocked {
pid: Pid,
},
Woke {
pid: Pid,
},
Deadlocked {
blocked: Vec<Pid>,
},
}Expand description
A record of what the supervisor did, so a caller can assert on behaviour rather than infer it from final state.
Variants§
Exited
Restarted
GaveUp
Restart intensity exceeded: the supervisor gave up rather than restarting in a tight loop forever.
Blocked
A process parked waiting for a message.
Woke
A parked process was woken by an arriving message.
Deadlocked
Every remaining process is parked and nothing is pending, so no message can ever arrive. Reported rather than spun on, because a deadlocked switch that looks busy is far worse than one that says which processes are stuck.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe 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