pub struct SupervisorHooks {
pub exit_action: Option<Box<dyn FnMut(&ExitInfo) -> ExitAction + Send>>,
pub start_gate: Option<Box<dyn FnMut(&StartGateInfo) -> StartGate + Send>>,
}Expand description
Optional decisions the supervisor asks its host (rightkit#936). Every hook runs on the supervisor thread; keep each short.
Fields§
§exit_action: Option<Box<dyn FnMut(&ExitInfo) -> ExitAction + Send>>Called when a child exits by itself.
start_gate: Option<Box<dyn FnMut(&StartGateInfo) -> StartGate + Send>>Called before every launch, the first included (a start precondition: wait for a handover).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SupervisorHooks
impl !Sync for SupervisorHooks
impl !UnwindSafe for SupervisorHooks
impl Freeze for SupervisorHooks
impl Send for SupervisorHooks
impl Unpin for SupervisorHooks
impl UnsafeUnpin for SupervisorHooks
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