Enum sopht::manager::RestartPolicy
source · pub enum RestartPolicy {
Never,
Always,
OnFailure(u32),
}
Expand description
describes the conditions under which a process will be restarted in an
upkeep cycle. this has no effect on State::restart
Variants§
Never
do not restart the process
Always
restart the process if it stops for any reason, including successful exit codes
OnFailure(u32)
restart the process if it exits with a nonzero exit code. the single parameter is the retry count, which will be 1 less in each new instance of the process. a process with a retry count of 0 will not be restarted
Trait Implementations§
source§impl Clone for RestartPolicy
impl Clone for RestartPolicy
source§fn clone(&self) -> RestartPolicy
fn clone(&self) -> RestartPolicy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RestartPolicy
impl Debug for RestartPolicy
source§impl<'de> Deserialize<'de> for RestartPolicy
impl<'de> Deserialize<'de> for RestartPolicy
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
source§impl Display for RestartPolicy
impl Display for RestartPolicy
source§impl PartialEq for RestartPolicy
impl PartialEq for RestartPolicy
source§fn eq(&self, other: &RestartPolicy) -> bool
fn eq(&self, other: &RestartPolicy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RestartPolicy
impl Serialize for RestartPolicy
impl Copy for RestartPolicy
impl StructuralPartialEq for RestartPolicy
Auto Trait Implementations§
impl RefUnwindSafe for RestartPolicy
impl Send for RestartPolicy
impl Sync for RestartPolicy
impl Unpin for RestartPolicy
impl UnwindSafe for RestartPolicy
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