Enum prost_types::DurationError
source · #[non_exhaustive]
pub enum DurationError {
ParseFailure,
NegativeDuration(Duration),
OutOfRange,
}Expand description
A duration handling error.
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.
ParseFailure
Indicates failure to parse a Duration from a string.
The Duration string format is specified in the Protobuf JSON mapping specification.
NegativeDuration(Duration)
Indicates failure to convert a prost_types::Duration to a std::time::Duration because
the duration is negative. The included std::time::Duration matches the magnitude of the
original negative prost_types::Duration.
OutOfRange
Indicates failure to convert a std::time::Duration to a prost_types::Duration.
Converting a std::time::Duration to a prost_types::Duration fails if the magnitude
exceeds that representable by prost_types::Duration.
Trait Implementations
sourceimpl Debug for DurationError
impl Debug for DurationError
sourceimpl Display for DurationError
impl Display for DurationError
sourceimpl Error for DurationError
impl Error for DurationError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl PartialEq<DurationError> for DurationError
impl PartialEq<DurationError> for DurationError
sourcefn eq(&self, other: &DurationError) -> bool
fn eq(&self, other: &DurationError) -> bool
impl StructuralPartialEq for DurationError
Auto Trait Implementations
impl RefUnwindSafe for DurationError
impl Send for DurationError
impl Sync for DurationError
impl Unpin for DurationError
impl UnwindSafe for DurationError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more