Trait EffectGate
pub trait EffectGate: Send + 'static {
// Required method
fn with_effect<R>(
&self,
effect: impl FnOnce() -> Result<R, String>,
) -> Result<R, String>;
}Expand description
Custody of a delayed host effect. A scoped chooser or URI request carries the caller that asked for it, and the worker rechecks that caller immediately before the host effect runs; an expired caller never reaches the effect.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl EffectGate for ResourceEffectScope
A scoped chooser or URI request rechecks this admitted caller on the host’s worker immediately before the effect.