pub struct TerminationPolicy { /* private fields */ }Expand description
Policy used to terminate a spawned process.
Implementations§
Source§impl TerminationPolicy
impl TerminationPolicy
Sourcepub const fn new(signal: Signal, grace: Duration, force: bool) -> Self
pub const fn new(signal: Signal, grace: Duration, force: bool) -> Self
Creates a process-termination policy.
Sourcepub const fn force(self) -> bool
pub const fn force(self) -> bool
Returns whether the process is forcibly terminated after the grace period.
Sourcepub fn set_signal(&mut self, signal: Signal) -> &mut Self
pub fn set_signal(&mut self, signal: Signal) -> &mut Self
Sets the graceful-termination signal.
Trait Implementations§
Source§impl Clone for TerminationPolicy
impl Clone for TerminationPolicy
Source§fn clone(&self) -> TerminationPolicy
fn clone(&self) -> TerminationPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TerminationPolicy
Source§impl Debug for TerminationPolicy
impl Debug for TerminationPolicy
Source§impl Default for TerminationPolicy
impl Default for TerminationPolicy
Source§impl<'de> Deserialize<'de> for TerminationPolicy
impl<'de> Deserialize<'de> for TerminationPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TerminationPolicy
Source§impl PartialEq for TerminationPolicy
impl PartialEq for TerminationPolicy
Source§impl Serialize for TerminationPolicy
impl Serialize for TerminationPolicy
impl StructuralPartialEq for TerminationPolicy
Auto Trait Implementations§
impl Freeze for TerminationPolicy
impl RefUnwindSafe for TerminationPolicy
impl Send for TerminationPolicy
impl Sync for TerminationPolicy
impl Unpin for TerminationPolicy
impl UnsafeUnpin for TerminationPolicy
impl UnwindSafe for TerminationPolicy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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