pub struct NegativeDurationError;Expand description
Error returned when a duration-like value is negative.
This is primarily used by optional ecosystem adapters (chrono / time)
when converting into core::time::Duration (which is always non-negative).
Trait Implementations§
Source§impl Clone for NegativeDurationError
impl Clone for NegativeDurationError
Source§fn clone(&self) -> NegativeDurationError
fn clone(&self) -> NegativeDurationError
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 NegativeDurationError
impl Debug for NegativeDurationError
Source§impl Display for NegativeDurationError
impl Display for NegativeDurationError
Source§impl Error for NegativeDurationError
Available on crate feature std only.
impl Error for NegativeDurationError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<NegativeDurationError> for DurationConversionError
impl From<NegativeDurationError> for DurationConversionError
Source§fn from(_: NegativeDurationError) -> Self
fn from(_: NegativeDurationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NegativeDurationError
impl PartialEq for NegativeDurationError
Source§fn eq(&self, other: &NegativeDurationError) -> bool
fn eq(&self, other: &NegativeDurationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for NegativeDurationError
impl Eq for NegativeDurationError
impl StructuralPartialEq for NegativeDurationError
Auto Trait Implementations§
impl Freeze for NegativeDurationError
impl RefUnwindSafe for NegativeDurationError
impl Send for NegativeDurationError
impl Sync for NegativeDurationError
impl Unpin for NegativeDurationError
impl UnsafeUnpin for NegativeDurationError
impl UnwindSafe for NegativeDurationError
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> Humanize for T
impl<T> Humanize for T
Source§fn human_bytes(self) -> BytesDisplaywhere
Self: BytesLike,
fn human_bytes(self) -> BytesDisplaywhere
Self: BytesLike,
Formats this value as a human-readable byte size using default options.
Source§fn human_bytes_with(self, options: BytesOptions) -> BytesDisplaywhere
Self: BytesLike,
fn human_bytes_with(self, options: BytesOptions) -> BytesDisplaywhere
Self: BytesLike,
Formats this value as a human-readable byte size using custom options.
Source§fn human_ago(self) -> AgoDisplaywhere
Self: DurationLike,
fn human_ago(self) -> AgoDisplaywhere
Self: DurationLike,
Formats this duration as relative time using default options.
Source§fn human_ago_with(self, options: DurationOptions) -> AgoDisplaywhere
Self: DurationLike,
fn human_ago_with(self, options: DurationOptions) -> AgoDisplaywhere
Self: DurationLike,
Formats this duration as relative time using custom duration options.
Source§fn human_duration(self) -> DurationDisplaywhere
Self: DurationLike,
fn human_duration(self) -> DurationDisplaywhere
Self: DurationLike,
Formats this duration using default options.
Source§fn human_duration_with(self, options: DurationOptions) -> DurationDisplaywhere
Self: DurationLike,
fn human_duration_with(self, options: DurationOptions) -> DurationDisplaywhere
Self: DurationLike,
Formats this duration using custom duration options.
Source§fn human_number(self) -> NumberDisplaywhere
Self: NumberLike,
fn human_number(self) -> NumberDisplaywhere
Self: NumberLike,
Formats this numeric value as a compact human-readable number using default options.
Source§fn human_number_with(self, options: NumberOptions) -> NumberDisplaywhere
Self: NumberLike,
fn human_number_with(self, options: NumberOptions) -> NumberDisplaywhere
Self: NumberLike,
Formats this numeric value as a compact human-readable number using custom options.
Source§fn human_ordinal(self) -> OrdinalDisplaywhere
Self: OrdinalLike,
fn human_ordinal(self) -> OrdinalDisplaywhere
Self: OrdinalLike,
Formats this value as an ordinal number.
Source§fn human_percent(self) -> PercentDisplaywhere
Self: PercentLike,
fn human_percent(self) -> PercentDisplaywhere
Self: PercentLike,
Formats this value as a human-readable percentage using default options. Read more
Source§fn human_percent_with(self, options: PercentOptions) -> PercentDisplaywhere
Self: PercentLike,
fn human_percent_with(self, options: PercentOptions) -> PercentDisplaywhere
Self: PercentLike,
Formats this value as a human-readable percentage using custom options.