pub struct RRule { /* private fields */ }Expand description
A validated Recurrence Rule that can be used to create an iterator.
Implementations
sourceimpl RRule
impl RRule
sourcepub fn new(properties: RRuleProperties) -> Result<Self, RRuleError>
pub fn new(properties: RRuleProperties) -> Result<Self, RRuleError>
Create and validate the given properties and make sure they are valid before creating an RRule struct. If the properties are not valid it will return an error.
sourcepub fn get_properties(&self) -> &RRuleProperties
pub fn get_properties(&self) -> &RRuleProperties
Get the parameters set by the RRule.
Trait Implementations
sourceimpl<'a> DateFilter<'a, RRuleIter<'a>> for RRule
impl<'a> DateFilter<'a, RRuleIter<'a>> for RRule
sourcefn all(&'a self, limit: u16) -> Result<Vec<DateTime<Tz>>, RRuleError>
fn all(&'a self, limit: u16) -> Result<Vec<DateTime<Tz>>, RRuleError>
Returns all the recurrences of the rrule. Read more
sourcefn all_with_error(
&'a self,
limit: u16
) -> (Vec<DateTime<Tz>>, Option<RRuleError>)
fn all_with_error(
&'a self,
limit: u16
) -> (Vec<DateTime<Tz>>, Option<RRuleError>)
Returns all the recurrences of the rrule. Read more
sourcefn just_before(
&'a self,
before: DateTime<Tz>,
inclusive: bool
) -> Result<Option<DateTime<Tz>>, RRuleError>
fn just_before(
&'a self,
before: DateTime<Tz>,
inclusive: bool
) -> Result<Option<DateTime<Tz>>, RRuleError>
Returns the last recurrence before the given datetime instance. Read more
sourcefn all_before_with_error(
&'a self,
before: DateTime<Tz>,
inclusive: bool,
limit: u16
) -> (Vec<DateTime<Tz>>, Option<RRuleError>)
fn all_before_with_error(
&'a self,
before: DateTime<Tz>,
inclusive: bool,
limit: u16
) -> (Vec<DateTime<Tz>>, Option<RRuleError>)
Returns all the recurrences of the rrule before the given date. Read more
sourcefn just_after(
&'a self,
after: DateTime<Tz>,
inclusive: bool
) -> Result<Option<DateTime<Tz>>, RRuleError>
fn just_after(
&'a self,
after: DateTime<Tz>,
inclusive: bool
) -> Result<Option<DateTime<Tz>>, RRuleError>
Returns the last recurrence after the given datetime instance. Read more
sourcefn all_after_with_error(
&'a self,
after: DateTime<Tz>,
inclusive: bool,
limit: u16
) -> (Vec<DateTime<Tz>>, Option<RRuleError>)
fn all_after_with_error(
&'a self,
after: DateTime<Tz>,
inclusive: bool,
limit: u16
) -> (Vec<DateTime<Tz>>, Option<RRuleError>)
Returns all the recurrences of the rrule after the given date. Read more
Auto Trait Implementations
impl RefUnwindSafe for RRule
impl Send for RRule
impl Sync for RRule
impl Unpin for RRule
impl UnwindSafe for RRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more