pub struct DurationSpec(/* private fields */);Expand description
A Docker duration string such as 30s, 1m, or 500ms.
Implementations§
Source§impl DurationSpec
impl DurationSpec
Sourcepub fn new(value: impl AsRef<str>) -> Result<DurationSpec, HealthcheckError>
pub fn new(value: impl AsRef<str>) -> Result<DurationSpec, HealthcheckError>
Creates a duration spec from text.
Trait Implementations§
Source§impl AsRef<str> for DurationSpec
impl AsRef<str> for DurationSpec
Source§impl Clone for DurationSpec
impl Clone for DurationSpec
Source§fn clone(&self) -> DurationSpec
fn clone(&self) -> DurationSpec
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 DurationSpec
impl Debug for DurationSpec
Source§impl Display for DurationSpec
impl Display for DurationSpec
Source§impl FromStr for DurationSpec
impl FromStr for DurationSpec
Source§type Err = HealthcheckError
type Err = HealthcheckError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<DurationSpec, <DurationSpec as FromStr>::Err>
fn from_str(value: &str) -> Result<DurationSpec, <DurationSpec as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for DurationSpec
impl Hash for DurationSpec
Source§impl Ord for DurationSpec
impl Ord for DurationSpec
Source§fn cmp(&self, other: &DurationSpec) -> Ordering
fn cmp(&self, other: &DurationSpec) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DurationSpec
impl PartialEq for DurationSpec
Source§fn eq(&self, other: &DurationSpec) -> bool
fn eq(&self, other: &DurationSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DurationSpec
impl PartialOrd for DurationSpec
impl Eq for DurationSpec
impl StructuralPartialEq for DurationSpec
Auto Trait Implementations§
impl Freeze for DurationSpec
impl RefUnwindSafe for DurationSpec
impl Send for DurationSpec
impl Sync for DurationSpec
impl Unpin for DurationSpec
impl UnsafeUnpin for DurationSpec
impl UnwindSafe for DurationSpec
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