pub trait DeliberationRepositoryPort: Send + Sync {
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
deliberation: &'life1 Deliberation,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Deliberation, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<bool, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn save_authorized<'life0, 'life1, 'async_trait>(
&'life0 self,
deliberation: &'life1 Deliberation,
authorization: Option<AuthorizationEvidence>,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
deliberation: &'life1 Deliberation,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
deliberation: &'life1 Deliberation,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist (or update) a deliberation keyed by its task id.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Deliberation, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Deliberation, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a deliberation by task id. Returns
DomainError::NotFound when absent.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".