pub trait AwaitEventResolver: Send + Sync {
// Provided methods
fn durability_tier(&self) -> DurabilityTier { ... }
fn supports_durable_effects(&self) -> bool { ... }
fn await_event_key<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ExecutionScope,
wait: AwaitEventWaitIdentity,
) -> Pin<Box<dyn Future<Output = Result<AwaitEventKey, RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn resolve_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
resolution: Resolution,
) -> Pin<Box<dyn Future<Output = Result<ResolveOutcome, RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn peek_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Resolution>, RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn await_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
cancel: CancellationToken,
deadline: Option<Instant>,
) -> Pin<Box<dyn Future<Output = Result<Resolution, RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn revoke_await_events_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn cancel_await_events_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Shared durability and Durable Wait contract for effect boundaries.
Both the deployment-level EffectHost factory and the per-run
RuntimeEffectController resolve Durable Waits and describe their
durability; this supertrait is the single declaration of that contract.
Provided Methods§
fn durability_tier(&self) -> DurabilityTier
fn supports_durable_effects(&self) -> bool
fn await_event_key<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ExecutionScope,
wait: AwaitEventWaitIdentity,
) -> Pin<Box<dyn Future<Output = Result<AwaitEventKey, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
resolution: Resolution,
) -> Pin<Box<dyn Future<Output = Result<ResolveOutcome, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn peek_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Resolution>, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn peek_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Resolution>, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read a keyed promise without waiting for or resolving it.
Turn owners use this as a synchronous start gate before beginning a
new effect. Durable owners must perform that read through their
handler-scoped, replay-aware controller: its result affects subsequent
command order and therefore must replay identically after an owner
crash. An unresolved promise returns None and remains open.
fn await_await_event<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 AwaitEventKey,
cancel: CancellationToken,
deadline: Option<Instant>,
) -> Pin<Box<dyn Future<Output = Result<Resolution, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn revoke_await_events_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn cancel_await_events_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_await_events_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel every outstanding durable wait for session_id without
deleting the session: each waiter receives a terminal
Resolution::Cancelled instead of hanging, late resolves observe
that terminal, and waits registered afterwards behave normally — in
contrast to revoke_await_events_for_session,
which tombstones the session’s waits forever.
The default errors loudly: an effect boundary that tracks durable waits must implement this to honor the host lever, and one that cannot must not silently claim success.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".