pub struct PlatformEmergencySignal { /* private fields */ }Expand description
Opaque, non-reap-capable emergency termination capability.
It can be used while the actor has a pending wait on
PlatformLifecycle, but it cannot observe or consume the exit result.
Implementations§
Source§impl PlatformEmergencySignal
impl PlatformEmergencySignal
Sourcepub fn kill(&self) -> Result<()>
pub fn kill(&self) -> Result<()>
Request immediate termination without waiting for process reaping.
Sourcepub fn terminate_group_soft(&self) -> Result<bool>
pub fn terminate_group_soft(&self) -> Result<bool>
Ask the child’s whole process group to shut down gracefully.
Returns Ok(false) when the child was not spawned with
SpawnSpec::create_process_group: there is no group to address, and
signalling anyway would hit the caller’s own group on POSIX or the
caller’s console on Windows. A child that has already exited is also
Ok – the soft step’s only job is to give a live child a chance to
clean up before a hard kill, so a dead target is a success.
Auto Trait Implementations§
impl Freeze for PlatformEmergencySignal
impl RefUnwindSafe for PlatformEmergencySignal
impl Send for PlatformEmergencySignal
impl Sync for PlatformEmergencySignal
impl Unpin for PlatformEmergencySignal
impl UnsafeUnpin for PlatformEmergencySignal
impl UnwindSafe for PlatformEmergencySignal
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
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> ⓘ
Converts
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> ⓘ
Converts
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