pub trait Validator<W, A> {
// Required method
fn validate(
&self,
sel: &CertifiedSelection<W, A>,
) -> Result<Witness, ValidationError>;
}Expand description
A backend-agnostic validator for CertifiedSelection.
Implementations consume a selection and either return a Witness
(selection is correct) or a ValidationError (selection is wrong, or
unsupported, or inconclusive).
Required Methods§
Sourcefn validate(
&self,
sel: &CertifiedSelection<W, A>,
) -> Result<Witness, ValidationError>
fn validate( &self, sel: &CertifiedSelection<W, A>, ) -> Result<Witness, ValidationError>
Validate sel. Returns Ok(Witness) iff the selection is
semantically equivalent to the source op.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".