pub trait RouteRepositoryPort: Send + Sync {
// Required methods
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RouteRuntimeAggregate>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save<'life0, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_if_version<'life0, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn take_recovered<'life0, 'life1, 'async_trait>(
&'life0 self,
_route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RouteRuntimeAggregate>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_if_version<'life0, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
Sourcefn take_recovered<'life0, 'life1, 'async_trait>(
&'life0 self,
_route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn take_recovered<'life0, 'life1, 'async_trait>(
&'life0 self,
_route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Consume the “recovered from journal” marker for route_id.
Returns true exactly once for a route that was reconstructed by
journal replay at boot and has not yet been re-registered in this
process. This lets declarative-boot registration adopt a persisted
aggregate (same route_id, same config source) instead of rejecting
it, while a genuine same-session duplicate registration still returns
false and is rejected as AlreadyExists.
Default implementation returns false (no durable recovery — behaves
exactly as before this capability existed).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".