serenade-validator 1.0.0

Constraint validation for DTOs and messenger commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Validator errors.

/// Failure while running constraints.
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
pub enum ValidatorError {
    /// Validation produced one or more violations.
    #[error("validation failed with {count} violation(s)")]
    Violations {
        /// Number of collected violations.
        count: usize,
    },
}