pub enum CalendarError {
InvalidDate(String),
InvalidWeek(String),
InvalidWeekday(String),
InvalidDays(String),
InvalidDuration(f64),
NoStartDate(Day),
NoWeekSystem(Week),
NotADuration(Day),
Custom(String),
At {
path: String,
error: Box<CalendarError>,
},
}Expand description
An error reading a date or converting one to days.
Variants§
InvalidDate(String)
InvalidWeek(String)
InvalidWeekday(String)
InvalidDays(String)
Days with units that do not parse.
InvalidDuration(f64)
A negative or NaN value in a duration field.
NoStartDate(Day)
A date or week with no start date to count from.
NoWeekSystem(Week)
NotADuration(Day)
A date or week in a duration field.
Custom(String)
From a hand-written Calendar impl.
At
An error in a field, such as policies[0].start.
Implementations§
Trait Implementations§
Source§impl Clone for CalendarError
impl Clone for CalendarError
Source§fn clone(&self) -> CalendarError
fn clone(&self) -> CalendarError
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 CalendarError
impl Debug for CalendarError
Source§impl Display for CalendarError
impl Display for CalendarError
Source§impl Error for CalendarError
impl Error for CalendarError
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 PartialEq for CalendarError
impl PartialEq for CalendarError
Source§fn eq(&self, other: &CalendarError) -> bool
fn eq(&self, other: &CalendarError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CalendarError
Auto Trait Implementations§
impl Freeze for CalendarError
impl RefUnwindSafe for CalendarError
impl Send for CalendarError
impl Sync for CalendarError
impl Unpin for CalendarError
impl UnsafeUnpin for CalendarError
impl UnwindSafe for CalendarError
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.