Skip to main content

par_validator/
errors.rs

1use std::{borrow::Cow, fmt::Debug};
2
3/// Outcome of a single validation rule in a [`crate::RuleBuilder`].
4#[derive(Debug, PartialEq, Eq)]
5pub enum RuleBuilderError<E: PartialEq + Eq + Send + Sync> {
6    /// Reserved for generic / framework-level messages.
7    ExampleError(Cow<'static, String>),
8    /// Domain validation failure carrying your error type `E`.
9    Fail(E),
10    /// Rule passed.
11    Success,
12}