pub struct Workspace { /* private fields */ }Implementations§
Source§impl Workspace
impl Workspace
pub fn new(path: impl Into<String>) -> Self
pub fn with_storage(self, storage: Arc<dyn Storage>) -> Self
pub async fn open(path: impl Into<String>) -> Result<Self, Error>
pub async fn path(&self) -> String
pub async fn config(&self) -> Option<WorkspaceConfig>
pub fn subscribe(&self) -> EventReceiver
pub async fn get_board(&self, id: &str) -> Result<BoardRef, Error>
pub async fn list_boards(&self) -> Result<Vec<String>, Error>
pub async fn create_board( &self, id: &str, title: &str, ) -> Result<BoardRef, Error>
pub async fn delete_board(&self, id: &str) -> Result<(), Error>
pub async fn save_task(&self, board_id: &str, task: &Task) -> Result<(), Error>
pub async fn transaction<F, T>(&self, _board_id: &str, f: F) -> Result<T, Error>
pub async fn builder() -> WorkspaceBuilder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl !RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl !UnwindSafe for Workspace
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