#[non_exhaustive]pub enum GeneratedRestartPolicy {
No,
Always,
OnFailure {
maximum_retries: Option<u64>,
},
UnlessStopped,
}Expand description
A valid service-level Compose restart policy selected for generated output.
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 a maximum retry count.
UnlessStopped
Restart except after an explicit stop or removal.
Trait Implementations§
Source§impl Clone for GeneratedRestartPolicy
impl Clone for GeneratedRestartPolicy
Source§fn clone(&self) -> GeneratedRestartPolicy
fn clone(&self) -> GeneratedRestartPolicy
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 GeneratedRestartPolicy
Source§impl Debug for GeneratedRestartPolicy
impl Debug for GeneratedRestartPolicy
impl Eq for GeneratedRestartPolicy
Source§impl PartialEq for GeneratedRestartPolicy
impl PartialEq for GeneratedRestartPolicy
impl StructuralPartialEq for GeneratedRestartPolicy
Auto Trait Implementations§
impl Freeze for GeneratedRestartPolicy
impl RefUnwindSafe for GeneratedRestartPolicy
impl Send for GeneratedRestartPolicy
impl Sync for GeneratedRestartPolicy
impl Unpin for GeneratedRestartPolicy
impl UnsafeUnpin for GeneratedRestartPolicy
impl UnwindSafe for GeneratedRestartPolicy
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