pub struct FileRepository { /* private fields */ }Expand description
BacklogItemRepository and SprintRepository implementation backed by the .pinto/ directory.
Implementations§
Trait Implementations§
Source§impl BacklogItemRepository for FileRepository
impl BacklogItemRepository for FileRepository
Source§async fn save(&self, item: &BacklogItem) -> Result<()>
async fn save(&self, item: &BacklogItem) -> Result<()>
Save a backlog item, replacing any existing item with the same ID.
Source§async fn load(&self, id: &ItemId) -> Result<BacklogItem>
async fn load(&self, id: &ItemId) -> Result<BacklogItem>
Load a backlog item by ID. Return
crate::error::Error::NotFound when it does not exist.Source§async fn list(&self) -> Result<Vec<BacklogItem>>
async fn list(&self) -> Result<Vec<BacklogItem>>
Return all backlog items in lexicographic rank order, using the ID as a tie-breaker. Read more
Source§async fn delete(&self, id: &ItemId) -> Result<()>
async fn delete(&self, id: &ItemId) -> Result<()>
Delete a backlog item by ID. Return
crate::error::Error::NotFound when it does not exist.Source§impl Clone for FileRepository
impl Clone for FileRepository
Source§fn clone(&self) -> FileRepository
fn clone(&self) -> FileRepository
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileRepository
impl Debug for FileRepository
Source§impl SprintRepository for FileRepository
impl SprintRepository for FileRepository
Source§async fn save(&self, sprint: &Sprint) -> Result<()>
async fn save(&self, sprint: &Sprint) -> Result<()>
Save a sprint, replacing any existing sprint with the same ID.
Source§async fn load(&self, id: &SprintId) -> Result<Sprint>
async fn load(&self, id: &SprintId) -> Result<Sprint>
Load a sprint by ID. Return
crate::error::Error::SprintNotFound when it does not exist.Auto Trait Implementations§
impl Freeze for FileRepository
impl RefUnwindSafe for FileRepository
impl Send for FileRepository
impl Sync for FileRepository
impl Unpin for FileRepository
impl UnsafeUnpin for FileRepository
impl UnwindSafe for FileRepository
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more