Skip to main content

SupervisorEvent

Enum SupervisorEvent 

Source
pub enum SupervisorEvent {
Show 13 variants Started { launch: u64, pid: u32, }, Ready { launch: u64, }, Exited { launch: u64, code: Option<i32>, success: bool, }, Unhealthy { launch: u64, consecutive_failures: u32, }, StartupTimedOut { launch: u64, }, LaunchFailed { error: String, }, RestartScheduled { delay: Duration, }, AwaitingDemand, Exhausted, Stopped, StopUnconfirmed { launch: u64, pid: u32, }, Adopted { launch: u64, pid: u32, }, ForeignExited { launch: u64, pid: u32, },
}
Expand description

What happened, content-free. launch is the 1-based count of children started.

Variants§

§

Started

Fields

§launch: u64
§pid: u32
§

Ready

The child answered its first probe.

Fields

§launch: u64
§

Exited

The child exited by itself.

Fields

§launch: u64
§code: Option<i32>
§success: bool
§

Unhealthy

A child that had been healthy failed consecutive_failures probes in a row; it is stopped.

Fields

§launch: u64
§consecutive_failures: u32
§

StartupTimedOut

The child never answered a probe within the policy’s startup timeout; it is stopped.

Fields

§launch: u64
§

LaunchFailed

The launch closure failed (never started a child).

Fields

§error: String
§

RestartScheduled

Fields

§delay: Duration
§

AwaitingDemand

§

Exhausted

The restart budget is spent.

§

Stopped

The supervisor will not start another child (a policy that never restarts, or stop).

§

StopUnconfirmed

A stop was not confirmed (the child is still there after its grace and the kill): no replacement starts until it is gone (rightkit#936 b2).

Fields

§launch: u64
§pid: u32
§

Adopted

The child exited on purpose after forwarding; the instance with pid is supervised by identity now (ExitAction::AdoptForeign).

Fields

§launch: u64
§pid: u32
§

ForeignExited

The adopted foreign instance is gone.

Fields

§launch: u64
§pid: u32

Trait Implementations§

Source§

impl Clone for SupervisorEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SupervisorEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SupervisorEvent

Source§

impl PartialEq for SupervisorEvent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SupervisorEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.