Enum style_traits::values::specified::AllowedNumericType
[−]
[src]
#[repr(u8)]pub enum AllowedNumericType { All, NonNegative, AtLeastOne, }
Whether to allow negative lengths or not.
Variants
AllAllow all kind of numeric values.
NonNegativeAllow only non-negative numeric values.
AtLeastOneAllow only numeric values greater or equal to 1.0.
Methods
impl AllowedNumericType[src]
pub fn is_ok(&self, parsing_mode: ParsingMode, val: f32) -> bool[src]
Whether the value fits the rules of this numeric type.
pub fn clamp(&self, val: f32) -> f32[src]
Clamp the value following the rules of this numeric type.
Trait Implementations
impl Clone for AllowedNumericType[src]
fn clone(&self) -> AllowedNumericType[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for AllowedNumericType[src]
impl Debug for AllowedNumericType[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Eq for AllowedNumericType[src]
impl MallocSizeOf for AllowedNumericType[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
impl PartialEq for AllowedNumericType[src]
fn eq(&self, __arg_0: &AllowedNumericType) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl PartialOrd for AllowedNumericType[src]
fn partial_cmp(&self, __arg_0: &AllowedNumericType) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more