pub trait TaskRepository: Send + Sync {
// Required methods
async fn create(&self, task: &Task) -> Result<Task, RepositoryError>;
async fn get(&self, id: Uuid) -> Result<Task, RepositoryError>;
async fn list(&self, user_id: i32) -> Result<Vec<Task>, RepositoryError>;
async fn update(&self, task: &Task) -> Result<Task, RepositoryError>;
async fn delete(&self, id: Uuid) -> Result<(), RepositoryError>;
}Required Methods§
async fn create(&self, task: &Task) -> Result<Task, RepositoryError>
async fn get(&self, id: Uuid) -> Result<Task, RepositoryError>
async fn list(&self, user_id: i32) -> Result<Vec<Task>, RepositoryError>
async fn update(&self, task: &Task) -> Result<Task, RepositoryError>
async fn delete(&self, id: Uuid) -> Result<(), RepositoryError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".