pub struct TaskEvent { /* private fields */ }Expand description
Structure representing a single task event.
Implementations
sourceimpl TaskEvent
impl TaskEvent
sourcepub fn new(start: DateTime, proj: Option<String>, dur: Duration) -> Self
pub fn new(start: DateTime, proj: Option<String>, dur: Duration) -> Self
Create a TaskEvent with the supplied parameters.
sourcepub fn split(&self, dur: Duration) -> Option<(Self, Self)>
pub fn split(&self, dur: Duration) -> Option<(Self, Self)>
sourcepub fn add_dur(&mut self, dur: Duration)
pub fn add_dur(&mut self, dur: Duration)
Extend the TaskEvent’s duration by the supplied amount.
sourcepub fn second_offset(&self) -> u32
pub fn second_offset(&self) -> u32
Return the number of seconds after the hour of the starting time.
Trait Implementations
sourceimpl Ord for TaskEvent
impl Ord for TaskEvent
sourceimpl PartialOrd<TaskEvent> for TaskEvent
impl PartialOrd<TaskEvent> for TaskEvent
sourcefn partial_cmp(&self, other: &TaskEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &TaskEvent) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for TaskEvent
impl StructuralEq for TaskEvent
impl StructuralPartialEq for TaskEvent
Auto Trait Implementations
impl RefUnwindSafe for TaskEvent
impl Send for TaskEvent
impl Sync for TaskEvent
impl Unpin for TaskEvent
impl UnwindSafe for TaskEvent
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