pub struct PositiveValidator;Expand description
Positive number validator
Trait Implementations§
Source§impl ParameterValidator<f64> for PositiveValidator
impl ParameterValidator<f64> for PositiveValidator
type Error = SklearsError
Source§fn validate(
value: &f64,
) -> Result<(), <PositiveValidator as ParameterValidator<f64>>::Error>
fn validate( value: &f64, ) -> Result<(), <PositiveValidator as ParameterValidator<f64>>::Error>
Validate parameter at compile time
Source§impl ParameterValidator<i32> for PositiveValidator
impl ParameterValidator<i32> for PositiveValidator
type Error = SklearsError
Source§fn validate(
value: &i32,
) -> Result<(), <PositiveValidator as ParameterValidator<i32>>::Error>
fn validate( value: &i32, ) -> Result<(), <PositiveValidator as ParameterValidator<i32>>::Error>
Validate parameter at compile time
Auto Trait Implementations§
impl Freeze for PositiveValidator
impl RefUnwindSafe for PositiveValidator
impl Send for PositiveValidator
impl Sync for PositiveValidator
impl Unpin for PositiveValidator
impl UnwindSafe for PositiveValidator
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