pub trait EffectHost: Send + Sync {
// Required method
fn scoped<'run>(
&'run self,
scope: ExecutionScope,
) -> Result<ScopedEffectController<'run>, RuntimeError>;
// Provided methods
fn durability_tier(&self) -> DurabilityTier { ... }
fn requires_durable_attachment_store(&self) -> bool { ... }
fn supports_durable_effects(&self) -> bool { ... }
fn scoped_static(
&self,
_scope: ExecutionScope,
) -> Result<Option<ScopedEffectController<'static>>, RuntimeError> { ... }
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 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 { ... }
}Expand description
Deployment-level factory for scoped effect controllers.
Required Methods§
fn scoped<'run>( &'run self, scope: ExecutionScope, ) -> Result<ScopedEffectController<'run>, RuntimeError>
Provided Methods§
fn durability_tier(&self) -> DurabilityTier
fn requires_durable_attachment_store(&self) -> bool
fn supports_durable_effects(&self) -> bool
fn scoped_static( &self, _scope: ExecutionScope, ) -> Result<Option<ScopedEffectController<'static>>, RuntimeError>
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 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,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".