pub struct Project {
pub name: String,
/* private fields */
}
Fields
name: String
Implementations
sourceimpl Project
impl Project
pub fn new(name: String) -> Project
pub fn rename(&mut self, name: String)
pub fn push(&mut self, t: Task)
pub fn remove(&mut self, id: usize) -> Result<Task, RustaskError>
pub fn edit<F>(&mut self, id: usize, transform: F) -> Result<(), RustaskError> where
F: FnOnce(&mut Task),
pub fn tasks(&self) -> &Vec<Task>
pub fn len(&self) -> usize
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Project
impl<'de> Deserialize<'de> for Project
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
sourceimpl Ord for Project
impl Ord for Project
sourceimpl PartialOrd<Project> for Project
impl PartialOrd<Project> for Project
sourcefn partial_cmp(&self, other: &Project) -> Option<Ordering>
fn partial_cmp(&self, other: &Project) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Project
impl StructuralEq for Project
impl StructuralPartialEq for Project
Auto Trait Implementations
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
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