Skip to main content

CollectionConstraint

Trait CollectionConstraint 

Source
pub trait CollectionConstraint {
    // Required methods
    fn validate_slice<T>(&self, value: &[T]) -> ConstraintResult;
    fn name(&self) -> &'static str;
}
Expand description

Trait for validation constraints operating on collections

Required Methods§

Source

fn validate_slice<T>(&self, value: &[T]) -> ConstraintResult

Source

fn name(&self) -> &'static str

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§