pub trait Todo {
// Required methods
fn uid(&self) -> &str;
fn completed(&self) -> Option<DateTime<Local>>;
fn description(&self) -> Option<&str>;
fn due(&self) -> Option<LooseDateTime>;
fn percent_complete(&self) -> Option<u8>;
fn priority(&self) -> Priority;
fn status(&self) -> TodoStatus;
fn summary(&self) -> &str;
// Provided method
fn short_id(&self) -> Option<NonZeroU32> { ... }
}Expand description
Trait representing a todo item.
Required Methods§
Sourcefn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Returns the description of the todo item, if available.
Sourcefn due(&self) -> Option<LooseDateTime>
fn due(&self) -> Option<LooseDateTime>
Returns the due date and time of the todo item, if available.
Sourcefn percent_complete(&self) -> Option<u8>
fn percent_complete(&self) -> Option<u8>
The percent complete, from 0 to 100.
Sourcefn status(&self) -> TodoStatus
fn status(&self) -> TodoStatus
Returns the status of the todo item.
Provided Methods§
Sourcefn short_id(&self) -> Option<NonZeroU32>
fn short_id(&self) -> Option<NonZeroU32>
The short identifier for the todo.
It will be None if the event does not have a short ID.
It is used for display purposes and may not be unique.