pub struct Event {
pub start: NaiveDateTime,
pub start_overlap: bool,
pub end: Option<NaiveDateTime>,
pub end_overlap: bool,
pub description: String,
pub tags: Vec<String>,
pub vacation: bool,
pub vacation_type: Option<String>,
}
Fields
start: NaiveDateTime
start_overlap: bool
end: Option<NaiveDateTime>
end_overlap: bool
description: String
vacation: bool
vacation_type: Option<String>
Implementations
sourceimpl Event
impl Event
pub fn coin(description: String, tags: Vec<String>) -> Event
pub fn ongoing(&self) -> bool
pub fn duration(&self, now: &NaiveDateTime) -> f32
pub fn gather_by_day(events: Vec<Event>, end_date: &NaiveDateTime) -> Vec<Event>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn overlaps_start(&self) -> bool
pub fn overlaps_end(&self) -> bool
pub fn gather_by_day_and_merge(
events: Vec<Event>,
end_date: &NaiveDateTime
) -> Vec<Event>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn to_json(&self, now: &NaiveDateTime, conf: &Configuration) -> String
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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