1 2 3 4 5 6 7 8 9 10
use crate::traits::CollectionLength; /// Validate the length of collections. pub trait ValidateLength<T: CollectionLength>: Sized { type Error; fn parse_collection(v: T) -> Result<Self, Self::Error>; fn validate_collection(v: &T) -> Result<(), Self::Error>; }