pub struct CalendarEvent {
pub id: u64,
pub date: Date,
pub title: String,
pub tone: Tone,
pub done: bool,
}Expand description
Something on a EventCalendar’s day.
Fields§
§id: u64Given back by EventCalendar::on_event.
date: DateIts day.
title: StringWhat it is.
tone: ToneIts color; say what it means in the title or next to the scheduler too.
done: boolIt already happened, so it stands back.
Implementations§
Source§impl CalendarEvent
impl CalendarEvent
Sourcepub fn new(id: u64, date: Date, title: impl Into<String>) -> CalendarEvent
pub fn new(id: u64, date: Date, title: impl Into<String>) -> CalendarEvent
An event on this day.
Sourcepub fn tone(self, tone: Tone) -> CalendarEvent
pub fn tone(self, tone: Tone) -> CalendarEvent
Sets the color.
Sourcepub fn done(self, done: bool) -> CalendarEvent
pub fn done(self, done: bool) -> CalendarEvent
Marks it as already done.
Trait Implementations§
Source§impl Clone for CalendarEvent
impl Clone for CalendarEvent
Source§fn clone(&self) -> CalendarEvent
fn clone(&self) -> CalendarEvent
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 CalendarEvent
impl Debug for CalendarEvent
impl Eq for CalendarEvent
Source§impl PartialEq for CalendarEvent
impl PartialEq for CalendarEvent
impl StructuralPartialEq for CalendarEvent
Auto Trait Implementations§
impl Freeze for CalendarEvent
impl RefUnwindSafe for CalendarEvent
impl Send for CalendarEvent
impl Sync for CalendarEvent
impl Unpin for CalendarEvent
impl UnsafeUnpin for CalendarEvent
impl UnwindSafe for CalendarEvent
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.