pub enum ScriptDateError {
DayTooLarge(u8),
DayTooSmall(u8),
InvalidFormat {
part: ScriptDateErrorPart,
source: ParseIntError,
value: String,
},
MissingPart(ScriptDateErrorPart),
MonthTooLarge(u8),
MonthTooSmall(u8),
}
Expand description
Error enum when parsing a ScriptDate
fails.
Variants§
DayTooLarge(u8)
When a day
is provided that is greater than 31
.
DayTooSmall(u8)
When a day
is provided that is less than 1
.
InvalidFormat
The provided date was in the wrong format.
Fields
§
part: ScriptDateErrorPart
The part that couldn’t be parsed.
§
source: ParseIntError
The error itself from the failed parsing.
MissingPart(ScriptDateErrorPart)
A part of the date is missing.
The name of the part is provided.
MonthTooLarge(u8)
A month
is provided that is greater than 12
.
MonthTooSmall(u8)
A month
is provided that is less than 1
.
Trait Implementations§
Source§impl Clone for ScriptDateError
impl Clone for ScriptDateError
Source§fn clone(&self) -> ScriptDateError
fn clone(&self) -> ScriptDateError
Returns a copy 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 ScriptDateError
impl Debug for ScriptDateError
Source§impl Display for ScriptDateError
impl Display for ScriptDateError
Source§impl Error for ScriptDateError
impl Error for ScriptDateError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Source§impl PartialEq for ScriptDateError
impl PartialEq for ScriptDateError
impl Eq for ScriptDateError
impl StructuralPartialEq for ScriptDateError
Auto Trait Implementations§
impl Freeze for ScriptDateError
impl RefUnwindSafe for ScriptDateError
impl Send for ScriptDateError
impl Sync for ScriptDateError
impl Unpin for ScriptDateError
impl UnwindSafe for ScriptDateError
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