pub struct WeeklyRecurrenceSchedule { /* private fields */ }Implementations§
Source§impl WeeklyRecurrenceSchedule
impl WeeklyRecurrenceSchedule
pub fn new(interval: Interval, days: impl Into<NonEmpty<Weekday>>) -> Self
pub fn for_weekday(interval: Interval, day: Weekday) -> Self
Sourcepub fn every_two_weeks(starting: Date) -> Self
pub fn every_two_weeks(starting: Date) -> Self
Creates a schedule that is every two weeks from the starting date.
§Panics
Should not panic; panic is used when the internal hard coded value does not fit the invariants.
pub fn weekly_on(day: Weekday) -> Self
Sourcepub fn with_weekday_toggled(self, weekday: Weekday) -> Self
pub fn with_weekday_toggled(self, weekday: Weekday) -> Self
Toggles the weekday to be included in the schedule if it’s not included, and excluded if it is already included. If the given weekday is the last weekday in the schedule, nothing will hapen.
Trait Implementations§
Source§impl Clone for WeeklyRecurrenceSchedule
impl Clone for WeeklyRecurrenceSchedule
Source§fn clone(&self) -> WeeklyRecurrenceSchedule
fn clone(&self) -> WeeklyRecurrenceSchedule
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 moreSource§impl Debug for WeeklyRecurrenceSchedule
impl Debug for WeeklyRecurrenceSchedule
Source§impl From<WeeklyRecurrenceSchedule> for RecurrenceSchedule
impl From<WeeklyRecurrenceSchedule> for RecurrenceSchedule
Source§fn from(value: WeeklyRecurrenceSchedule) -> Self
fn from(value: WeeklyRecurrenceSchedule) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WeeklyRecurrenceSchedule
impl PartialEq for WeeklyRecurrenceSchedule
Source§fn eq(&self, other: &WeeklyRecurrenceSchedule) -> bool
fn eq(&self, other: &WeeklyRecurrenceSchedule) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Schedule for WeeklyRecurrenceSchedule
impl Schedule for WeeklyRecurrenceSchedule
Source§fn next_occurrence_after(&self, from: Date) -> Date
fn next_occurrence_after(&self, from: Date) -> Date
Provides the next scheduled date on this schedule after the given date.
Source§fn into_string(self, starting: Date) -> String
fn into_string(self, starting: Date) -> String
Converts this schedule into a string that can be parsed, given the same starting date, into
the same schedule.
impl Eq for WeeklyRecurrenceSchedule
impl StructuralPartialEq for WeeklyRecurrenceSchedule
Auto Trait Implementations§
impl Freeze for WeeklyRecurrenceSchedule
impl RefUnwindSafe for WeeklyRecurrenceSchedule
impl Send for WeeklyRecurrenceSchedule
impl Sync for WeeklyRecurrenceSchedule
impl Unpin for WeeklyRecurrenceSchedule
impl UnsafeUnpin for WeeklyRecurrenceSchedule
impl UnwindSafe for WeeklyRecurrenceSchedule
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