Skip to main content

SprintRepository

Trait SprintRepository 

Source
pub trait SprintRepository {
    // Required methods
    fn save(&self, sprint: &Sprint) -> impl Future<Output = Result<()>>;
    fn load(&self, id: &SprintId) -> impl Future<Output = Result<Sprint>>;
    fn list(&self) -> impl Future<Output = Result<Vec<Sprint>>>;
    fn delete(&self, id: &SprintId) -> impl Future<Output = Result<()>>;
}
Expand description

Persistence operations for sprints.

Implementations store sprints separately from backlog items. The method names overlap with BacklogItemRepository, so callers can disambiguate them with a fully qualified call such as SprintRepository::save(&repo, &sprint).

Required Methods§

Source

fn save(&self, sprint: &Sprint) -> impl Future<Output = Result<()>>

Save a sprint, replacing any existing sprint with the same ID.

Source

fn load(&self, id: &SprintId) -> impl Future<Output = Result<Sprint>>

Load a sprint by ID. Return crate::error::Error::SprintNotFound when it does not exist.

Source

fn list(&self) -> impl Future<Output = Result<Vec<Sprint>>>

Return all sprints in ascending creation-time order, using the ID as a tie-breaker.

Source

fn delete(&self, id: &SprintId) -> impl Future<Output = Result<()>>

Delete a sprint by ID. Return crate::error::Error::SprintNotFound when it does not exist.

Backend migration (crate::service::migrate_storage) uses this operation to remove destination sprints that are absent from the source.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§