pub struct TaskStore { /* private fields */ }Implementations§
Source§impl TaskStore
impl TaskStore
pub fn open(data_dir: &Path) -> Result<Self, ServerError>
pub fn in_memory() -> Result<Self, ServerError>
pub fn create( &self, title: &str, body: &str, assignee: Option<&str>, ) -> Result<Task, ServerError>
pub fn get(&self, id: i64) -> Result<Option<Task>, ServerError>
pub fn list( &self, assignee: Option<&str>, open_only: bool, ) -> Result<Vec<Task>, ServerError>
pub fn assign(&self, id: i64, assignee: &str) -> Result<bool, ServerError>
Sourcepub fn set_status(
&self,
id: i64,
status: &str,
only_assignee: Option<&str>,
) -> Result<bool, ServerError>
pub fn set_status( &self, id: i64, status: &str, only_assignee: Option<&str>, ) -> Result<bool, ServerError>
Operator cancel, or the assignee moving its own task along (in_progress, done).
Auto Trait Implementations§
impl !Freeze for TaskStore
impl !RefUnwindSafe for TaskStore
impl !Sync for TaskStore
impl !UnwindSafe for TaskStore
impl Send for TaskStore
impl Unpin for TaskStore
impl UnsafeUnpin for TaskStore
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