Skip to main content

Verifier

Trait Verifier 

Source
pub trait Verifier<T>:
    Send
    + Sync
    + 'static {
    // Required method
    fn check(&self, ctx: EffectContext) -> Option<VerificationFuture<T>>;
}
Expand description

The verification attached to an effect, if any.

Implemented by NoVerification and VerifyWith; set through EffectBuilder::verify. A failing check (Err) counts as Verification::Inconclusive.

Required Methods§

Source

fn check(&self, ctx: EffectContext) -> Option<VerificationFuture<T>>

Starts a check, or None if the effect has no verification.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, F, Fut> Verifier<T> for VerifyWith<F>
where F: Fn(EffectContext) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Verification<T>, EffectFailure>> + Send + 'static,

Source§

impl<T> Verifier<T> for NoVerification