pub struct Task {
pub number: usize,
pub title: String,
pub status: Status,
pub remaining_work: Option<u8>,
}
Expand description
A task represents a single job. Usage example:
use taskboard_core_lib::Task;
let task_1 = Task::new(1, "Learn rust");
let task_2 = Task::new(2, "Learn K8S");
assert_ne!(task_1, task_2);
Fields§
§number: usize
A number used for identifying tasks within a project
title: String
The task’s title
status: Status
The task’s current status
remaining_work: Option<u8>
Remaning work in number of hours, or None if not specified
Implementations§
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
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