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
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
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
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
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DurationError) -> bool
fn ne(&self, other: &DurationError) -> bool
This method tests for !=.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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