pub struct ParsedSacOrGreg { /* private fields */ }Expand description
Parsing result of SacOrGreg::parse_str.
Implementations§
Source§impl ParsedSacOrGreg
impl ParsedSacOrGreg
Sourcepub fn to_sac13(self) -> Option<ParsedDate>
pub fn to_sac13(self) -> Option<ParsedDate>
Converts the parsed result to a SAC13 ParsedDate. It will return None if it wasn’t a Gregorian Date.
If you are not sure you should pattern match ParsedSacOrGreg::date() instead.
Sourcepub fn to_greg(self) -> Option<ParsedGregorianDate>
pub fn to_greg(self) -> Option<ParsedGregorianDate>
Converts the parsed result to a ParsedGregorianDate. It will return None if it wasn’t a Gregorian Date.
If you are not sure you should pattern match ParsedSacOrGreg::date() instead.
Sourcepub fn date(&self) -> &SacOrGreg
pub fn date(&self) -> &SacOrGreg
Returns parsed date that is either a SAC13 or a Gregorian Calendar date.
Sourcepub fn format(&self) -> &ParsedFormat
pub fn format(&self) -> &ParsedFormat
Returns the format information from the parsed input string.
Trait Implementations§
Source§impl Clone for ParsedSacOrGreg
impl Clone for ParsedSacOrGreg
Source§fn clone(&self) -> ParsedSacOrGreg
fn clone(&self) -> ParsedSacOrGreg
Returns a duplicate 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 ParsedSacOrGreg
impl Debug for ParsedSacOrGreg
Source§impl Hash for ParsedSacOrGreg
impl Hash for ParsedSacOrGreg
Source§impl PartialEq for ParsedSacOrGreg
impl PartialEq for ParsedSacOrGreg
impl Eq for ParsedSacOrGreg
impl StructuralPartialEq for ParsedSacOrGreg
Auto Trait Implementations§
impl Freeze for ParsedSacOrGreg
impl RefUnwindSafe for ParsedSacOrGreg
impl Send for ParsedSacOrGreg
impl Sync for ParsedSacOrGreg
impl Unpin for ParsedSacOrGreg
impl UnwindSafe for ParsedSacOrGreg
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