validators 0.25.3

This library is designed for validating and modeling user input. The crate includes models, functions, traits, errors, and other dependencies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use alloc::vec::Vec;

/// Validate and deserialize bytes.
pub trait ValidateBytes: Sized {
    type Error;

    fn parse_vec_u8<V: Into<Vec<u8>>>(v: V) -> Result<Self, Self::Error>;

    fn parse_u8_slice<V: AsRef<[u8]>>(v: V) -> Result<Self, Self::Error>;

    fn validate_u8_slice<V: AsRef<[u8]>>(v: V) -> Result<(), Self::Error>;
}