pub struct Duration { /* private fields */ }Expand description
(duration feature) Accepts a human duration string (e.g. "30s", "5m", "1h30m") and coerces it to an
integer number of seconds (or milliseconds with Duration::millis).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnsafeUnpin for Duration
impl UnwindSafe for Duration
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<T> WithMeta for Twhere
T: Validator,
impl<T> WithMeta for Twhere
T: Validator,
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
The description, if any.
Source§fn examples(&self) -> &[(Value, Option<String>)]
fn examples(&self) -> &[(Value, Option<String>)]
The example values (each with an optional note).
Source§fn default_value(&self) -> Option<&Value>
fn default_value(&self) -> Option<&Value>
The default value, if any.
Source§fn with_name(self, name: impl Into<String>) -> Self
fn with_name(self, name: impl Into<String>) -> Self
Set the human-readable name (surfaced in error messages).
Source§fn with_description(self, text: impl Into<String>) -> Self
fn with_description(self, text: impl Into<String>) -> Self
Attach a human-readable description.
Source§fn with_example(self, value: impl Into<Value>) -> Self
fn with_example(self, value: impl Into<Value>) -> Self
Add an example value.
Source§fn with_example_noted(
self,
value: impl Into<Value>,
note: impl Into<String>,
) -> Self
fn with_example_noted( self, value: impl Into<Value>, note: impl Into<String>, ) -> Self
Add an example value with an explanatory note.
Source§fn with_default(self, value: impl Into<Value>) -> Self
fn with_default(self, value: impl Into<Value>) -> Self
Set the default value used as an on-error fallback (see the pipeline’s validate stage).