1 2 3 4 5 6 7
//! Constraint trait definition use crate::error::Result; /// Trait which represents a object which can verify and validate data pub trait Constraint<T> { fn validate(&self, data: &T) -> Result<()>; }