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::string::String;

/// Validate and deserialize strings.
pub trait ValidateString: Sized {
    type Error;

    fn parse_string<S: Into<String>>(s: S) -> Result<Self, Self::Error>;

    fn parse_str<S: AsRef<str>>(s: S) -> Result<Self, Self::Error>;

    fn validate_str<S: AsRef<str>>(s: S) -> Result<(), Self::Error>;
}