pub struct DateParser { /* private fields */ }
Expand description
Struct implementing the parser to generate a Date
from a date description.
Implementations§
Source§impl DateParser
impl DateParser
Sourcepub fn parse(&self, datespec: &str) -> Result<Date>
pub fn parse(&self, datespec: &str) -> Result<Date>
Parse the supplied string to return a Date
if successful.
§Errors
- Return
DateError::InvalidDate
if the specification for a single day is not valid. - Return
DateError::InvalidDaySpec
if overall range specification is not valid.
Trait Implementations§
Source§impl Default for DateParser
impl Default for DateParser
Source§fn default() -> Self
fn default() -> Self
Return a DateParser
, parsing relative to today.
Auto Trait Implementations§
impl Freeze for DateParser
impl RefUnwindSafe for DateParser
impl Send for DateParser
impl Sync for DateParser
impl Unpin for DateParser
impl UnwindSafe for DateParser
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