#[non_exhaustive]pub enum RestartPolicyKind {
No,
Always,
OnFailure {
maximum_retries: Option<String>,
},
UnlessStopped,
Expression,
Other,
}Expand description
The recognized family of a service-level Compose restart policy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
No
Never restart the container automatically.
Always
Always restart the container until it is removed.
OnFailure
Restart after an error, optionally with the authored maximum-retry spelling.
Fields
UnlessStopped
Restart except after an explicit stop or removal.
Expression
A policy that still contains a Compose interpolation expression.
Other
An invalid or provider-specific value retained for diagnostics.
Trait Implementations§
Source§impl Clone for RestartPolicyKind
impl Clone for RestartPolicyKind
Source§fn clone(&self) -> RestartPolicyKind
fn clone(&self) -> RestartPolicyKind
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 moreSource§impl Debug for RestartPolicyKind
impl Debug for RestartPolicyKind
impl Eq for RestartPolicyKind
Source§impl PartialEq for RestartPolicyKind
impl PartialEq for RestartPolicyKind
impl StructuralPartialEq for RestartPolicyKind
Auto Trait Implementations§
impl Freeze for RestartPolicyKind
impl RefUnwindSafe for RestartPolicyKind
impl Send for RestartPolicyKind
impl Sync for RestartPolicyKind
impl Unpin for RestartPolicyKind
impl UnsafeUnpin for RestartPolicyKind
impl UnwindSafe for RestartPolicyKind
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