pub trait DomainConstraint:
Debug
+ Send
+ Sync
+ 'static {
type Value;
// Required methods
fn check(&self, var: &dyn Var, v: &Self::Value) -> Result<(), VarError>;
fn describe(&self) -> DomainDescription;
}Required Associated Types§
Required Methods§
fn check(&self, var: &dyn Var, v: &Self::Value) -> Result<(), VarError>
Sourcefn describe(&self) -> DomainDescription
fn describe(&self) -> DomainDescription
Describes the accepted values, for tools that validate a parameter’s
value without running Self::check.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".