pub trait VerifiableEffect: EffectHandler {
// Required method
fn verify(
&self,
ctx: &EffectContext,
input: &Self::Input,
) -> impl Future<Output = Result<Verification<Self::Output>, Self::Error>> + Send;
// Provided method
fn verification_mode(&self) -> VerificationMode { ... }
}Expand description
A handler whose effect can be looked up in the remote system.
Register it with Handler::verifiable to verify after every success and
to resolve unknown outcomes; see
EffectBuilder::verify.
Required Methods§
Sourcefn verify(
&self,
ctx: &EffectContext,
input: &Self::Input,
) -> impl Future<Output = Result<Verification<Self::Output>, Self::Error>> + Send
fn verify( &self, ctx: &EffectContext, input: &Self::Input, ) -> impl Future<Output = Result<Verification<Self::Output>, Self::Error>> + Send
Asks the remote system whether the effect applied.
Provided Methods§
Sourcefn verification_mode(&self) -> VerificationMode
fn verification_mode(&self) -> VerificationMode
How far a lookup can be trusted. Defaults to
VerificationMode::Authoritative; use
VerificationMode::EventuallyConsistent for lookups that lag.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".