pub enum EntryKind {
Start,
Stop,
Ignored,
Event,
}Expand description
Enumeration of different kinds of task entries
Variants
Start
An entry that starts a task.
Stop
Stop the most current task.
Ignored
An entry that is ignored.
Event
An entry that marks a zero duration event.
Implementations
sourceimpl EntryKind
impl EntryKind
sourcepub fn new(mark: Option<char>) -> Self
pub fn new(mark: Option<char>) -> Self
Create a new EntryKind from an optional character, defaulting to EntryKind::Start
if the character is not recognized.
sourcepub fn try_new(mark: Option<char>) -> Result<Self, EntryError>
pub fn try_new(mark: Option<char>) -> Result<Self, EntryError>
Create a new EntryKind from an optional character.
Errors
Return EntryError::InvalidMarker if character not recognized.
sourcepub fn from_entry_line(line: &str) -> Self
pub fn from_entry_line(line: &str) -> Self
Extract the appropriate EntryKind from supplied entry line.
pub fn is_start(&self) -> bool
pub fn is_ignored(&self) -> bool
pub fn is_event(&self) -> bool
pub fn is_stop(&self) -> bool
Trait Implementations
impl Eq for EntryKind
impl StructuralEq for EntryKind
impl StructuralPartialEq for EntryKind
Auto Trait Implementations
impl RefUnwindSafe for EntryKind
impl Send for EntryKind
impl Sync for EntryKind
impl Unpin for EntryKind
impl UnwindSafe for EntryKind
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