pub struct EventCalendar(/* private fields */);
Expand description
Represents a calendar of events
Implementations§
Source§impl EventCalendar
impl EventCalendar
Sourcepub fn add_event(&mut self, event: Event) -> Option<Event>
pub fn add_event(&mut self, event: Event) -> Option<Event>
inserts event into calednar, returning None if the event is new to the calendar and Some(Event) if the event already exits
Sourcepub fn events_in_range(
&self,
start: NaiveDateTime,
end: NaiveDateTime,
) -> impl Iterator<Item = (&Uuid, &Event)>
pub fn events_in_range( &self, start: NaiveDateTime, end: NaiveDateTime, ) -> impl Iterator<Item = (&Uuid, &Event)>
return an iterator of all events between start and end
Sourcepub fn first_event(&self) -> Option<&Event>
pub fn first_event(&self) -> Option<&Event>
return the first event in the Calendar
Trait Implementations§
Source§impl Default for EventCalendar
impl Default for EventCalendar
Source§fn default() -> EventCalendar
fn default() -> EventCalendar
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventCalendar
impl RefUnwindSafe for EventCalendar
impl Send for EventCalendar
impl Sync for EventCalendar
impl Unpin for EventCalendar
impl UnwindSafe for EventCalendar
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