pub enum ExitIntent {
FollowPolicy,
StopRetryable,
StopInFlight,
RestartRetryable,
RestartInFlight,
}Expand description
Desired handling of the current child process when it exits.
Variants§
FollowPolicy
Apply the configured restart policy to an ordinary exit.
StopRetryable
Keep the process stopped, but permit another signal attempt because no successful delivery is currently in flight.
StopInFlight
Keep the process stopped and reuse the successfully delivered request.
RestartRetryable
Restart after exit, but permit another signal attempt because no successful delivery is currently in flight.
RestartInFlight
Restart after exit and reuse the successfully delivered request.
Implementations§
Source§impl ExitIntent
impl ExitIntent
Sourcepub fn request_stop(self) -> Self
pub fn request_stop(self) -> Self
Records explicit stop intent before attempting signal delivery.
Sourcepub fn stop_delivered(self) -> Self
pub fn stop_delivered(self) -> Self
Records that a stop signal was delivered successfully.
Sourcepub fn stop_delivery_failed(self) -> Self
pub fn stop_delivery_failed(self) -> Self
Records failed stop delivery, permitting a later retry while preserving the user’s instruction not to restart when the child exits.
Sourcepub fn request_restart(self) -> Self
pub fn request_restart(self) -> Self
Replaces any prior exit intent with an explicit restart request.
Sourcepub fn restart_delivered(self) -> Self
pub fn restart_delivered(self) -> Self
Records that a restart signal was delivered successfully.
Sourcepub fn restart_delivery_failed(self) -> Self
pub fn restart_delivery_failed(self) -> Self
Records failed restart delivery, permitting a later retry while preserving the user’s instruction to restart after any eventual exit.
Sourcepub fn accepts_stop_request(self) -> bool
pub fn accepts_stop_request(self) -> bool
Whether another stop input should attempt signal delivery.
Sourcepub fn accepts_restart_request(self) -> bool
pub fn accepts_restart_request(self) -> bool
Whether another restart input should attempt signal delivery.
Sourcepub fn is_stop(self) -> bool
pub fn is_stop(self) -> bool
Whether this intent represents an explicit request to remain stopped.
Sourcepub fn is_restart(self) -> bool
pub fn is_restart(self) -> bool
Whether this intent represents an explicit restart request.
Sourcepub fn force_stop_delivery_failed(self) -> Self
pub fn force_stop_delivery_failed(self) -> Self
Records that hard-kill escalation failed, preserving the requested exit behavior while permitting another signal attempt.
Sourcepub fn awaits_force_stop(self) -> bool
pub fn awaits_force_stop(self) -> bool
Whether a graceful stop is awaiting hard-kill escalation.
Trait Implementations§
Source§impl Clone for ExitIntent
impl Clone for ExitIntent
Source§fn clone(&self) -> ExitIntent
fn clone(&self) -> ExitIntent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExitIntent
Source§impl Debug for ExitIntent
impl Debug for ExitIntent
Source§impl Default for ExitIntent
impl Default for ExitIntent
Source§fn default() -> ExitIntent
fn default() -> ExitIntent
impl Eq for ExitIntent
Source§impl PartialEq for ExitIntent
impl PartialEq for ExitIntent
impl StructuralPartialEq for ExitIntent
Auto Trait Implementations§
impl Freeze for ExitIntent
impl RefUnwindSafe for ExitIntent
impl Send for ExitIntent
impl Sync for ExitIntent
impl Unpin for ExitIntent
impl UnsafeUnpin for ExitIntent
impl UnwindSafe for ExitIntent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more