pub enum DatePattern {
Any,
Value(Date),
Range(RangeInclusive<Date>),
Earliest(Date),
Latest(Date),
String(String),
Regex(Regex),
}Expand description
Pattern for matching date values in dCBOR.
Variants§
Any
Matches any date.
Value(Date)
Matches a specific date.
Range(RangeInclusive<Date>)
Matches dates within a range (inclusive).
Earliest(Date)
Matches dates that are on or after the specified date.
Latest(Date)
Matches dates that are on or before the specified date.
String(String)
Matches a date by its ISO-8601 string representation.
Regex(Regex)
Matches dates whose ISO-8601 string representation matches the given regex pattern.
Implementations§
Source§impl DatePattern
impl DatePattern
Sourcepub fn range(range: RangeInclusive<Date>) -> Self
pub fn range(range: RangeInclusive<Date>) -> Self
Creates a new DatePattern that matches dates within a range
(inclusive).
Sourcepub fn earliest(date: Date) -> Self
pub fn earliest(date: Date) -> Self
Creates a new DatePattern that matches dates that are on or after the
specified date.
Sourcepub fn latest(date: Date) -> Self
pub fn latest(date: Date) -> Self
Creates a new DatePattern that matches dates that are on or before the
specified date.
Trait Implementations§
Source§impl Clone for DatePattern
impl Clone for DatePattern
Source§fn clone(&self) -> DatePattern
fn clone(&self) -> DatePattern
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 DatePattern
impl Debug for DatePattern
Source§impl Display for DatePattern
impl Display for DatePattern
Source§impl Hash for DatePattern
impl Hash for DatePattern
Source§impl PartialEq for DatePattern
impl PartialEq for DatePattern
impl Eq for DatePattern
Auto Trait Implementations§
impl Freeze for DatePattern
impl RefUnwindSafe for DatePattern
impl Send for DatePattern
impl Sync for DatePattern
impl Unpin for DatePattern
impl UnwindSafe for DatePattern
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