pub enum TodoAction {
Complete,
Cancel,
MakeNext,
}Expand description
Intent-based operations on a TODO item.
Handlers map CLI/WebUI input to these actions instead of writing status strings directly.
Variants§
Implementations§
Source§impl TodoAction
impl TodoAction
Sourcepub fn from_cli_update_status(status: &str) -> Result<Self, TrackError>
pub fn from_cli_update_status(status: &str) -> Result<Self, TrackError>
Parses a track todo update status argument.
Sourcepub fn from_web_route(status: &str) -> Result<Self, TrackError>
pub fn from_web_route(status: &str) -> Result<Self, TrackError>
Parses a WebUI route segment such as /api/todo/1/done.
Sourcepub fn allowed_for(todo: &Todo) -> Vec<Self>
pub fn allowed_for(todo: &Todo) -> Vec<Self>
Returns actions the caller may invoke for this TODO.
pub fn as_str(&self) -> &'static str
Trait Implementations§
Source§impl Clone for TodoAction
impl Clone for TodoAction
Source§fn clone(&self) -> TodoAction
fn clone(&self) -> TodoAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TodoAction
Source§impl Debug for TodoAction
impl Debug for TodoAction
impl Eq for TodoAction
Source§impl PartialEq for TodoAction
impl PartialEq for TodoAction
Source§fn eq(&self, other: &TodoAction) -> bool
fn eq(&self, other: &TodoAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TodoAction
impl Serialize for TodoAction
impl StructuralPartialEq for TodoAction
Auto Trait Implementations§
impl Freeze for TodoAction
impl RefUnwindSafe for TodoAction
impl Send for TodoAction
impl Sync for TodoAction
impl Unpin for TodoAction
impl UnsafeUnpin for TodoAction
impl UnwindSafe for TodoAction
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