pub struct Task { /* private fields */ }
Implementations§
Source§impl Task
impl Task
pub fn new( name: String, description: String, status: String, ) -> Result<Task, &'static str>
pub fn from_properties( id: String, props: HashMap<String, String>, ) -> Result<Task, &'static str>
pub fn get_id(&self) -> Option<String>
pub fn set_id(&mut self, id: String)
pub fn get_property(&self, prop: &str) -> Option<&String>
pub fn get_all_properties(&self) -> &HashMap<String, String>
pub fn set_property(&mut self, prop: &str, value: &str)
pub fn has_property(&self, prop: &str) -> bool
pub fn delete_property(&mut self, prop: &str) -> bool
pub fn get_comments(&self) -> &Option<Vec<Comment>>
pub fn add_comment( &mut self, id: Option<String>, props: HashMap<String, String>, text: String, ) -> Comment
pub fn set_comments(&mut self, comments: Vec<Comment>)
pub fn delete_comment(&mut self, id: &String) -> Result<(), String>
pub fn get_labels(&self) -> &Option<Vec<Label>>
pub fn add_label( &mut self, name: String, description: Option<String>, color: Option<String>, ) -> Label
pub fn set_labels(&mut self, labels: Vec<Label>)
pub fn delete_label(&mut self, name: &str) -> Result<(), String>
pub fn get_label_by_name(&self, name: &str) -> Option<&Label>
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
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