[][src]Struct rrule::Options

pub struct Options {
    pub freq: Option<Frequenzy>,
    pub interval: Option<usize>,
    pub count: Option<u32>,
    pub until: Option<DateTime<Tz>>,
    pub tzid: Option<Tz>,
    pub dtstart: Option<DateTime<Tz>>,
    pub wkst: Option<usize>,
    pub bysetpos: Option<Vec<isize>>,
    pub bymonth: Option<Vec<usize>>,
    pub bymonthday: Option<Vec<isize>>,
    pub byyearday: Option<Vec<isize>>,
    pub byweekno: Option<Vec<isize>>,
    pub byweekday: Option<Vec<NWeekday>>,
    pub byhour: Option<Vec<usize>>,
    pub byminute: Option<Vec<usize>>,
    pub bysecond: Option<Vec<usize>>,
    pub byeaster: Option<isize>,
}

Fields

freq: Option<Frequenzy>interval: Option<usize>count: Option<u32>until: Option<DateTime<Tz>>tzid: Option<Tz>dtstart: Option<DateTime<Tz>>wkst: Option<usize>bysetpos: Option<Vec<isize>>bymonth: Option<Vec<usize>>bymonthday: Option<Vec<isize>>byyearday: Option<Vec<isize>>byweekno: Option<Vec<isize>>byweekday: Option<Vec<NWeekday>>byhour: Option<Vec<usize>>byminute: Option<Vec<usize>>bysecond: Option<Vec<usize>>byeaster: Option<isize>

Implementations

impl Options[src]

pub fn new() -> Self[src]

pub fn concat(opt1: &Self, opt2: &Self) -> Self[src]

pub fn freq(self, freq: Frequenzy) -> Self[src]

The FREQ rule part identifies the type of recurrence rule.

pub fn interval(self, interval: usize) -> Self[src]

The interval between each freq iteration.

pub fn count(self, count: u32) -> Self[src]

If given, this determines how many occurrences will be generated.

pub fn until(self, until: DateTime<Utc>) -> Self[src]

If given, this must be a datetime instance specifying the upper-bound limit of the recurrence.

pub fn dtstart(self, dtstart: DateTime<Tz>) -> Self[src]

The recurrence start. Recurrences generated by the rrule will be in the same time zone as the start date.

pub fn wkst(self, wkst: Weekday) -> Self[src]

The week start day. This will affect recurrences based on weekly periods. The default week start is Weekday::Mon.

pub fn bysetpos(self, bysetpos: Vec<isize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, positive or negative. Each given integer will specify an occurrence number, corresponding to the nth occurrence of the rule inside the frequency period. For example, a bysetpos of -1 if combined with a MONTHLY frequency, and a byweekday of (MO, TU, WE, TH, FR), will result in the last work day of every month.

pub fn bymonth(self, bymonth: Vec<usize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the months to apply the recurrence to.

pub fn bymonthday(self, bymonthday: Vec<isize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the month days to apply the recurrence to.

pub fn byyearday(self, byyearday: Vec<isize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the year days to apply the recurrence to.

pub fn byweekno(self, byweekno: Vec<isize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the week numbers to apply the recurrence to. Week numbers have the meaning described in ISO8601, that is, the first week of the year is that containing at least four days of the new year.

pub fn byweekday(self, byweekday: Vec<Weekday>) -> Self[src]

If given, it must be either an integer (0 == MO), a sequence of integers, one of the weekday constants (MO, TU, etc), or a sequence of these constants. When given, these variables will define the weekdays where the recurrence will be applied.

pub fn byhour(self, byhour: Vec<usize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the hours to apply the recurrence to.

pub fn byminute(self, byminute: Vec<usize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the minutes to apply the recurrence to.

pub fn bysecond(self, bysecond: Vec<usize>) -> Self[src]

If given, it must be either an integer, or a sequence of integers, meaning the seconds to apply the recurrence to.

pub fn byeaster(self, byeaster: isize) -> Self[src]

If given, it must be either an integer, or a sequence of integers, positive or negative. Each integer will define an offset from the Easter Sunday. Passing the offset 0 to byeaster will yield the Easter Sunday itself. This is an extension to the RFC specification.

pub fn build(self) -> Result<ParsedOptions, RRuleParseError>[src]

Parses the opptions and build ParsedOptions if they are valid. Otherwise an RRuleParseError will be returned.

Trait Implementations

impl Clone for Options[src]

impl Debug for Options[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.