pub enum OnExit {
    None,
    Restart,
    Requests(Vec<Request>),
}Variants§
Implementations§
source§impl OnExit
 
impl OnExit
sourcepub fn is_restart(&self) -> bool
 
pub fn is_restart(&self) -> bool
Check if this OnExit is Restart
sourcepub fn is_requests(&self) -> bool
 
pub fn is_requests(&self) -> bool
Check if this OnExit is Requests
sourcepub fn get_requests(&self) -> Option<&[Request]>
 
pub fn get_requests(&self) -> Option<&[Request]>
Get the Requests variant of this OnExit, if it is one
sourcepub fn add_request(&mut self, new: Request)
 
pub fn add_request(&mut self, new: Request)
Add a request to this OnExit if it is of variant Requests
sourcepub fn set(self) -> Result<(), BuildError>
 
pub fn set(self) -> Result<(), BuildError>
Set the OnExit behavior for this process.
Will return a [BuildError] if any requests within the Requests behavior are
not valid (by not having a body and/or target set).
sourcepub fn _to_standard(self) -> Result<OnExit, BuildError>
 
pub fn _to_standard(self) -> Result<OnExit, BuildError>
Convert this OnExit to the kernel’s OnExit type.
Will return a [BuildError] if any requests within the Requests behavior are
not valid (by not having a body and/or target set).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OnExit
impl RefUnwindSafe for OnExit
impl Send for OnExit
impl Sync for OnExit
impl Unpin for OnExit
impl UnwindSafe for OnExit
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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>
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