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§
Source§impl EntryKind
impl EntryKind
Sourcepub fn new<KC>(mark: KC) -> Self
pub fn new<KC>(mark: KC) -> Self
Create a new EntryKind
from an optional character, defaulting to EntryKind::Start
if the character is not recognized.
Sourcepub fn try_new<KC>(mark: KC) -> Result<Self, EntryError>
pub fn try_new<KC>(mark: KC) -> 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.
Sourcepub fn is_ignored(&self) -> bool
pub fn is_ignored(&self) -> bool
Is an ignored entry marker
Trait Implementations§
impl Copy for EntryKind
impl Eq for EntryKind
impl StructuralPartialEq for EntryKind
Auto Trait Implementations§
impl Freeze for EntryKind
impl RefUnwindSafe for EntryKind
impl Send for EntryKind
impl Sync for EntryKind
impl Unpin for EntryKind
impl UnwindSafe for EntryKind
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