Struct taskboard_core_lib::Task
source · [−]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
sourceimpl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
sourcefn 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 RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more