pub enum OnExit {
None,
Restart,
Requests(Vec<Request>),
}Variants§
Implementations§
Source§impl OnExit
impl OnExit
Sourcepub fn is_none(&self) -> bool
pub fn is_none(&self) -> bool
Check if this OnExit is OnExit::None.
Sourcepub fn is_restart(&self) -> bool
pub fn is_restart(&self) -> bool
Check if this OnExit is OnExit::Restart.
Sourcepub fn is_requests(&self) -> bool
pub fn is_requests(&self) -> bool
Check if this OnExit is OnExit::Requests.
Sourcepub fn get_requests(&self) -> Option<&[Request]>
pub fn get_requests(&self) -> Option<&[Request]>
Get the OnExit::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 OnExit::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 OnExit::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 OnExit::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§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