Enum style_traits::values::specified::AllowedNumericType
source · #[repr(u8)]pub enum AllowedNumericType {
All = 0,
NonNegative = 1,
AtLeastOne = 2,
ZeroToOne = 3,
}
Expand description
Whether to allow negative lengths or not.
Variants§
All = 0
Allow all kind of numeric values.
NonNegative = 1
Allow only non-negative numeric values.
AtLeastOne = 2
Allow only numeric values greater or equal to 1.0.
ZeroToOne = 3
Allow only numeric values from 0 to 1.0.
Implementations§
Trait Implementations§
source§impl Clone for AllowedNumericType
impl Clone for AllowedNumericType
source§fn clone(&self) -> AllowedNumericType
fn clone(&self) -> AllowedNumericType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AllowedNumericType
impl Debug for AllowedNumericType
source§impl Default for AllowedNumericType
impl Default for AllowedNumericType
source§impl<'de> Deserialize<'de> for AllowedNumericType
impl<'de> Deserialize<'de> for AllowedNumericType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl MallocSizeOf for AllowedNumericType
impl MallocSizeOf for AllowedNumericType
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for AllowedNumericType
impl PartialEq for AllowedNumericType
source§fn eq(&self, other: &AllowedNumericType) -> bool
fn eq(&self, other: &AllowedNumericType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AllowedNumericType
impl PartialOrd for AllowedNumericType
source§fn partial_cmp(&self, other: &AllowedNumericType) -> Option<Ordering>
fn partial_cmp(&self, other: &AllowedNumericType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for AllowedNumericType
impl Serialize for AllowedNumericType
source§impl ToShmem for AllowedNumericType
impl ToShmem for AllowedNumericType
impl Copy for AllowedNumericType
impl Eq for AllowedNumericType
impl StructuralPartialEq for AllowedNumericType
Auto Trait Implementations§
impl Freeze for AllowedNumericType
impl RefUnwindSafe for AllowedNumericType
impl Send for AllowedNumericType
impl Sync for AllowedNumericType
impl Unpin for AllowedNumericType
impl UnwindSafe for AllowedNumericType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.