pub enum TimeOfDayError {
InvalidHour(u8),
InvalidMinute(u8),
InvalidSecond(u8),
InvalidSecondOfDay(u64),
InvalidSeconds(InvalidSeconds),
InvalidLeapSecond,
InvalidIsoString(String),
}Expand description
Error type returned when attempting to construct a TimeOfDay from invalid components.
Variants§
InvalidHour(u8)
Hour is outside the valid range [0, 24).
InvalidMinute(u8)
Minute is outside the valid range [0, 60).
InvalidSecond(u8)
Second is outside the valid range [0, 61).
InvalidSecondOfDay(u64)
Second of day is outside the valid range [0, 86401).
InvalidSeconds(InvalidSeconds)
Floating-point seconds value is out of range.
InvalidLeapSecond
A leap second was specified at a time other than the end of the day.
InvalidIsoString(String)
The input string is not a valid ISO 8601 time.
Trait Implementations§
Source§impl Clone for TimeOfDayError
impl Clone for TimeOfDayError
Source§fn clone(&self) -> TimeOfDayError
fn clone(&self) -> TimeOfDayError
Returns a duplicate of the value. Read more
1.0.0 · 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 TimeOfDayError
impl Debug for TimeOfDayError
Source§impl Display for TimeOfDayError
impl Display for TimeOfDayError
Source§impl Error for TimeOfDayError
impl Error for TimeOfDayError
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<InvalidSeconds> for TimeOfDayError
impl From<InvalidSeconds> for TimeOfDayError
Source§fn from(source: InvalidSeconds) -> TimeOfDayError
fn from(source: InvalidSeconds) -> TimeOfDayError
Converts to this type from the input type.
Source§impl From<TimeOfDayError> for TimeError
impl From<TimeOfDayError> for TimeError
Source§fn from(source: TimeOfDayError) -> Self
fn from(source: TimeOfDayError) -> Self
Converts to this type from the input type.
Source§impl From<TimeOfDayError> for UtcError
impl From<TimeOfDayError> for UtcError
Source§fn from(source: TimeOfDayError) -> Self
fn from(source: TimeOfDayError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TimeOfDayError
impl PartialEq for TimeOfDayError
impl Eq for TimeOfDayError
impl StructuralPartialEq for TimeOfDayError
Auto Trait Implementations§
impl Freeze for TimeOfDayError
impl RefUnwindSafe for TimeOfDayError
impl Send for TimeOfDayError
impl Sync for TimeOfDayError
impl Unpin for TimeOfDayError
impl UnsafeUnpin for TimeOfDayError
impl UnwindSafe for TimeOfDayError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more