pub enum ValidatorRangeOption<T> {
    Inside {
        min: Option<T>,
        max: Option<T>,
    },
    Outside {
        min: Option<T>,
        max: Option<T>,
    },
    NotLimited,
}
Expand description

A special kind of options for validators related to ranges.

Variants§

§

Inside

Fields

§min: Option<T>
§max: Option<T>
§

Outside

Fields

§min: Option<T>
§max: Option<T>
§

NotLimited

Implementations§

source§

impl ValidatorRangeOption<f32>

source

pub fn inside(&self) -> Option<(Option<f32>, Option<f32>)>

source

pub fn outside(&self) -> Option<(Option<f32>, Option<f32>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<f64>

source

pub fn inside(&self) -> Option<(Option<f64>, Option<f64>)>

source

pub fn outside(&self) -> Option<(Option<f64>, Option<f64>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<u8>

source

pub fn inside(&self) -> Option<(Option<u8>, Option<u8>)>

source

pub fn outside(&self) -> Option<(Option<u8>, Option<u8>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<u16>

source

pub fn inside(&self) -> Option<(Option<u16>, Option<u16>)>

source

pub fn outside(&self) -> Option<(Option<u16>, Option<u16>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<u32>

source

pub fn inside(&self) -> Option<(Option<u32>, Option<u32>)>

source

pub fn outside(&self) -> Option<(Option<u32>, Option<u32>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<u64>

source

pub fn inside(&self) -> Option<(Option<u64>, Option<u64>)>

source

pub fn outside(&self) -> Option<(Option<u64>, Option<u64>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<u128>

source

pub fn inside(&self) -> Option<(Option<u128>, Option<u128>)>

source

pub fn outside(&self) -> Option<(Option<u128>, Option<u128>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<usize>

source

pub fn inside(&self) -> Option<(Option<usize>, Option<usize>)>

source

pub fn outside(&self) -> Option<(Option<usize>, Option<usize>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<i8>

source

pub fn inside(&self) -> Option<(Option<i8>, Option<i8>)>

source

pub fn outside(&self) -> Option<(Option<i8>, Option<i8>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<i16>

source

pub fn inside(&self) -> Option<(Option<i16>, Option<i16>)>

source

pub fn outside(&self) -> Option<(Option<i16>, Option<i16>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<i32>

source

pub fn inside(&self) -> Option<(Option<i32>, Option<i32>)>

source

pub fn outside(&self) -> Option<(Option<i32>, Option<i32>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<i64>

source

pub fn inside(&self) -> Option<(Option<i64>, Option<i64>)>

source

pub fn outside(&self) -> Option<(Option<i64>, Option<i64>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<i128>

source

pub fn inside(&self) -> Option<(Option<i128>, Option<i128>)>

source

pub fn outside(&self) -> Option<(Option<i128>, Option<i128>)>

source

pub fn not_limited(&self) -> bool

source§

impl ValidatorRangeOption<isize>

source

pub fn inside(&self) -> Option<(Option<isize>, Option<isize>)>

source

pub fn outside(&self) -> Option<(Option<isize>, Option<isize>)>

source

pub fn not_limited(&self) -> bool

Trait Implementations§

source§

impl<T: Clone> Clone for ValidatorRangeOption<T>

source§

fn clone(&self) -> ValidatorRangeOption<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ValidatorRangeOption<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for ValidatorRangeOption<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: PartialEq> PartialEq<ValidatorRangeOption<T>> for ValidatorRangeOption<T>

source§

fn eq(&self, other: &ValidatorRangeOption<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Eq> Eq for ValidatorRangeOption<T>

source§

impl<T> StructuralEq for ValidatorRangeOption<T>

source§

impl<T> StructuralPartialEq for ValidatorRangeOption<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ValidatorRangeOption<T>where T: RefUnwindSafe,

§

impl<T> Send for ValidatorRangeOption<T>where T: Send,

§

impl<T> Sync for ValidatorRangeOption<T>where T: Sync,

§

impl<T> Unpin for ValidatorRangeOption<T>where T: Unpin,

§

impl<T> UnwindSafe for ValidatorRangeOption<T>where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.