pub struct ContainerRestartPolicy {
pub kind: ContainerRestartKind,
pub max_attempts: Option<u32>,
pub delay: Option<String>,
}Expand description
Container-runtime-level restart policy.
Maps onto Docker’s HostConfig.RestartPolicy. Distinct from
PanicPolicy, which governs what ZLayer does in response to an
application panic (it does not set a Docker restart policy).
Fields§
§kind: ContainerRestartKindWhich restart policy to apply.
max_attempts: Option<u32>For on_failure only: maximum number of restart attempts before
giving up. Ignored by other kinds. None means “retry forever”.
delay: Option<String>Humantime-formatted delay between restarts (e.g. "500ms",
"2s"). Accepted for forward-compatibility but currently ignored
by the Docker backend: bollard’s RestartPolicy has no per-kind
delay field. When set, the runtime emits a warning.
Trait Implementations§
Source§impl Clone for ContainerRestartPolicy
impl Clone for ContainerRestartPolicy
Source§fn clone(&self) -> ContainerRestartPolicy
fn clone(&self) -> ContainerRestartPolicy
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 ComposeSchema for ContainerRestartPolicy
impl ComposeSchema for ContainerRestartPolicy
Source§impl Debug for ContainerRestartPolicy
impl Debug for ContainerRestartPolicy
Source§impl<'de> Deserialize<'de> for ContainerRestartPolicy
impl<'de> Deserialize<'de> for ContainerRestartPolicy
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 PartialEq for ContainerRestartPolicy
impl PartialEq for ContainerRestartPolicy
Source§fn eq(&self, other: &ContainerRestartPolicy) -> bool
fn eq(&self, other: &ContainerRestartPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContainerRestartPolicy
impl Serialize for ContainerRestartPolicy
Source§impl ToSchema for ContainerRestartPolicy
impl ToSchema for ContainerRestartPolicy
impl Eq for ContainerRestartPolicy
impl StructuralPartialEq for ContainerRestartPolicy
Auto Trait Implementations§
impl Freeze for ContainerRestartPolicy
impl RefUnwindSafe for ContainerRestartPolicy
impl Send for ContainerRestartPolicy
impl Sync for ContainerRestartPolicy
impl Unpin for ContainerRestartPolicy
impl UnsafeUnpin for ContainerRestartPolicy
impl UnwindSafe for ContainerRestartPolicy
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.