pub struct TaskEvent { /* private fields */ }
Expand description
Structure representing a single task event.
Implementations§
source§impl TaskEvent
impl TaskEvent
sourcepub fn new<'a, OS>(start: DateTime, proj: OS, dur: Duration) -> Selfwhere
OS: Into<Option<&'a str>>,
pub fn new<'a, OS>(start: DateTime, proj: OS, dur: Duration) -> Selfwhere OS: Into<Option<&'a str>>,
Create a TaskEvent
with the supplied parameters.
sourcepub fn from_entry(entry: &Entry) -> Self
pub fn from_entry(entry: &Entry) -> Self
Create a TaskEvent
from the supplied entry
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§
source§impl Ord for TaskEvent
impl Ord for TaskEvent
source§impl PartialEq<TaskEvent> for TaskEvent
impl PartialEq<TaskEvent> for TaskEvent
source§impl PartialOrd<TaskEvent> for TaskEvent
impl PartialOrd<TaskEvent> for TaskEvent
1.0.0 · source§fn 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 moreimpl 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§
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