Enum rust_version::ParseDateError
[−]
[src]
pub enum ParseDateError<'a> { Format(&'a [u8]), Number(&'a [u8]), OverflowYear(&'a [u8]), OverflowMonthDay(&'a [u8]), MonthDay { month: u8, day: u8, }, LeapDay { year: u32, }, BeforeRust { year: u32, month: u8, day: u8, }, }
Error encountered when parsing a Date
.
Variants
Format(&'a [u8])
The string wasn't in the format "Y-M-D"
.
Number(&'a [u8])
The given number was not valid.
OverflowYear(&'a [u8])
The given number was too large to be a proper year.
OverflowMonthDay(&'a [u8])
The given number was too large to be a proper month or day.
MonthDay
The given month/day pair will never occur.
Fields of MonthDay
month: u8 | |
day: u8 |
LeapDay
February 29th doesn't exist on the given year.
Fields of LeapDay
year: u32 |
BeforeRust
The given date occurred before the first release of Rust.
It might not even be an actual date.
Fields of BeforeRust
year: u32 | |
month: u8 | |
day: u8 |
Trait Implementations
impl<'a> Clone for ParseDateError<'a>
[src]
fn clone(&self) -> ParseDateError<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Copy for ParseDateError<'a>
[src]
impl<'a> Eq for ParseDateError<'a>
[src]
impl<'a> PartialEq for ParseDateError<'a>
[src]
fn eq(&self, __arg_0: &ParseDateError<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ParseDateError<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> Hash for ParseDateError<'a>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> Debug for ParseDateError<'a>
[src]
impl<'a> Display for ParseDateError<'a>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more