pub trait DispatchIntentStore: Send + Sync {
// Required methods
fn configure_route<'a>(
&'a self,
route: &'a DispatchRoute,
) -> ContractFuture<'a, ()>;
fn lease_publications<'a>(
&'a self,
destination: &'a str,
limit: u32,
deadline: Instant,
) -> ContractFuture<'a, Vec<PublicationLease>>;
fn complete_publications<'a>(
&'a self,
completions: &'a [PublicationCompletion],
deadline: Instant,
) -> ContractFuture<'a, ()>;
}Expand description
Maintenance of durable delivery obligations. Implementations commit intent creation/invalidation atomically with the corresponding task transition. Publishing is external I/O and must never run while a state transaction is held. Finite leases and retry/repair delays are backend policy, not execution concurrency settings. Unknown operation outcomes are safe to retry.
Required Methods§
Sourcefn configure_route<'a>(
&'a self,
route: &'a DispatchRoute,
) -> ContractFuture<'a, ()>
fn configure_route<'a>( &'a self, route: &'a DispatchRoute, ) -> ContractFuture<'a, ()>
Idempotent for an identical existing route; reject changing its destination. Initial external activation rejects a queue containing queued or active tasks. This prevents already accepted integrated tasks being silently stranded.
Sourcefn lease_publications<'a>(
&'a self,
destination: &'a str,
limit: u32,
deadline: Instant,
) -> ContractFuture<'a, Vec<PublicationLease>>
fn lease_publications<'a>( &'a self, destination: &'a str, limit: u32, deadline: Instant, ) -> ContractFuture<'a, Vec<PublicationLease>>
Reserve at most limit due intents, where 1 <= limit <= 100. The deadline
bounds admission, database work, and commit acknowledgement. Expired leases
become recoverable; an uncertain send keeps its publication identity.
Sourcefn complete_publications<'a>(
&'a self,
completions: &'a [PublicationCompletion],
deadline: Instant,
) -> ContractFuture<'a, ()>
fn complete_publications<'a>( &'a self, completions: &'a [PublicationCompletion], deadline: Instant, ) -> ContractFuture<'a, ()>
Complete at most 100 leases, conditional on dispatch generation, publication identity, and lease token. Late/stale or repeated completions are harmless. A later error may follow earlier per-item commits.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".