pub enum TimezoneOffsetError {
OutOfRange(Decimal),
NotNumeric,
UnresolvableInstant,
MissingStartDate,
InvalidStartDate,
}Expand description
Error from constructing a TimezoneOffset.
Variants§
OutOfRange(Decimal)
The value fell outside the -12..=13 hour range VoIP.ms accepts. Also
returned by TimezoneOffset::at for a zone whose offset exceeds that
range (e.g. Pacific/Kiritimati, +14).
NotNumeric
The string was not a number.
UnresolvableInstant
The chosen instant does not exist in the zone (a DST spring-forward gap), so no offset could be resolved.
MissingStartDate
A timezone zone was given without the query start date that anchors
its DST resolution (date_from / from), so there is no instant to
resolve the offset at.
InvalidStartDate
The query start date string did not parse as a YYYY-MM-DD date, so
the zone’s offset could not be resolved at it.
Trait Implementations§
Source§impl Clone for TimezoneOffsetError
impl Clone for TimezoneOffsetError
Source§fn clone(&self) -> TimezoneOffsetError
fn clone(&self) -> TimezoneOffsetError
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 TimezoneOffsetError
impl Debug for TimezoneOffsetError
Source§impl Display for TimezoneOffsetError
impl Display for TimezoneOffsetError
impl Eq for TimezoneOffsetError
Source§impl Error for TimezoneOffsetError
impl Error for TimezoneOffsetError
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<TimezoneOffsetError> for Error
impl From<TimezoneOffsetError> for Error
Source§fn from(source: TimezoneOffsetError) -> Self
fn from(source: TimezoneOffsetError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TimezoneOffsetError
impl PartialEq for TimezoneOffsetError
impl StructuralPartialEq for TimezoneOffsetError
Auto Trait Implementations§
impl Freeze for TimezoneOffsetError
impl RefUnwindSafe for TimezoneOffsetError
impl Send for TimezoneOffsetError
impl Sync for TimezoneOffsetError
impl Unpin for TimezoneOffsetError
impl UnsafeUnpin for TimezoneOffsetError
impl UnwindSafe for TimezoneOffsetError
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