pub struct DetectedDate {
pub byte_span: Range<usize>,
pub parsed: NaiveDateTime,
pub original_format: &'static str,
pub kind: DateKind,
}Expand description
A date span detected inside a filename. byte_span is recorded so a
future caller can locate the date and move it within the name.
Fields§
§byte_span: Range<usize>Byte range (in the slugified pre-substitution string) where the date was found.
parsed: NaiveDateTimeParsed date/time.
original_format: &'static strPendulum-style format string from POSSIBLE_FORMATS.
kind: DateKindGranularity of the detected date.
Trait Implementations§
Source§impl Clone for DetectedDate
impl Clone for DetectedDate
Source§fn clone(&self) -> DetectedDate
fn clone(&self) -> DetectedDate
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 moreAuto Trait Implementations§
impl Freeze for DetectedDate
impl RefUnwindSafe for DetectedDate
impl Send for DetectedDate
impl Sync for DetectedDate
impl Unpin for DetectedDate
impl UnsafeUnpin for DetectedDate
impl UnwindSafe for DetectedDate
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