pub type Day = ConstrainedValue<DayOfMonth>;Expand description
Represents a constrained value for the day of the month (1-31)
Aliased Type§
pub enum Day {
All,
Range(DayOfMonth, DayOfMonth),
Repetition {
start: DayOfMonth,
end: Option<DayOfMonth>,
rep: u8,
},
Specific(Vec<DayOfMonth>),
}Variants§
All
Every value
Range(DayOfMonth, DayOfMonth)
A range of values
Repetition
A repetition of values
This is a sequence of values: start, start + rep, start + 2*rep
up to the optional end value. If no end value is given, it continues
to the maximum Bounded value for the type.
Specific(Vec<DayOfMonth>)
Specific values
Trait Implementations§
Source§impl ConstrainedValueParser<'_, DayOfMonth> for Day
impl ConstrainedValueParser<'_, DayOfMonth> for Day
Source§fn allow_rand() -> bool
fn allow_rand() -> bool
Whether to allow ‘R’ for random value
Source§fn repetition_regex() -> Regex
fn repetition_regex() -> Regex
The regex to match repetitions
Source§fn range_regex() -> Regex
fn range_regex() -> Regex
The regex to match ranges
Source§fn rep(start: DayOfMonth, end: Option<DayOfMonth>, rep: u8) -> Self
fn rep(start: DayOfMonth, end: Option<DayOfMonth>, rep: u8) -> Self
The ‘repetition’ constrained value
Source§fn range(first: DayOfMonth, second: DayOfMonth) -> Self
fn range(first: DayOfMonth, second: DayOfMonth) -> Self
The ‘range’ constrained value
Source§fn specific(values: Vec<DayOfMonth>) -> Self
fn specific(values: Vec<DayOfMonth>) -> Self
The ‘specific’ constrained value
Source§fn parse_range(s: &str) -> Result<Self>
fn parse_range(s: &str) -> Result<Self>
Parse a range constrained value from a string Read more