pub struct Task { /* private fields */ }Expand description
See all columns using task columns and task _columns.
UDAs will only deserialize to a string or numeric type. Durations and dates will be parsed to a string.
Implementations§
Source§impl Task
Getters (Immutable)
impl Task
Getters (Immutable)
pub fn id(&self) -> &Option<usize>
pub fn uuid(&self) -> &Uuid
pub fn description(&self) -> &str
pub fn start(&self) -> Option<&DateTime<Utc>>
pub fn end(&self) -> Option<&DateTime<Utc>>
pub fn entry(&self) -> &DateTime<Utc>
pub fn modified(&self) -> &DateTime<Utc>
pub fn project(&self) -> &str
pub fn status(&self) -> &Status
pub fn urgency(&self) -> &Option<f64>
pub fn annotations(&self) -> &[Annotation]
pub fn udas(&self) -> &HashMap<String, UdaValue>
Source§impl Task
Getters (Mutable)
impl Task
Getters (Mutable)
pub fn id_mut(&mut self) -> &mut Option<usize>
pub fn uuid_mut(&mut self) -> &mut Uuid
pub fn description_mut(&mut self) -> &mut String
pub fn start_mut(&mut self) -> &mut Option<DateTime<Utc>>
pub fn end_mut(&mut self) -> &mut Option<DateTime<Utc>>
pub fn entry_mut(&mut self) -> &mut DateTime<Utc>
pub fn modified_mut(&mut self) -> &mut DateTime<Utc>
pub fn project_mut(&mut self) -> &mut String
pub fn status_mut(&mut self) -> &mut Status
pub fn urgency_mut(&mut self) -> &mut Option<f64>
pub fn annotations_mut(&mut self) -> &mut Vec<Annotation>
pub fn udas_mut(&mut self) -> &mut HashMap<String, UdaValue>
Source§impl Task
Constructors
impl Task
Constructors
pub fn from_reader(reader: impl Read) -> Result<Self, Error>
Sourcepub fn from_stdin() -> Result<Self, Error>
pub fn from_stdin() -> Result<Self, Error>
Reads JSON from stdin and parses it into a Task.
Only takes the first line of input.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ToString for Task
ToString (JSON)
impl ToString for Task
ToString (JSON)
Uses JSON as this is the most common use case for converting a Task to a string.
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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