pub struct TypedConfigurationValidator<T, const N: usize> { /* private fields */ }Expand description
Advanced type-level validation for complex configurations
Implementations§
Source§impl<T, const N: usize> TypedConfigurationValidator<T, N>
impl<T, const N: usize> TypedConfigurationValidator<T, N>
Sourcepub const fn new(validators: [fn(&T) -> ValidationResult; N]) -> Self
pub const fn new(validators: [fn(&T) -> ValidationResult; N]) -> Self
Create a typed validator with a fixed number of validation functions
Sourcepub fn validate(&self, config: &T) -> ValidationReport
pub fn validate(&self, config: &T) -> ValidationReport
Validate configuration using all registered validators
Auto Trait Implementations§
impl<T, const N: usize> Freeze for TypedConfigurationValidator<T, N>
impl<T, const N: usize> RefUnwindSafe for TypedConfigurationValidator<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for TypedConfigurationValidator<T, N>where
T: Send,
impl<T, const N: usize> Sync for TypedConfigurationValidator<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for TypedConfigurationValidator<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for TypedConfigurationValidator<T, N>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more