Enum num_parser::ValueType
source · [−]pub enum ValueType {
IntType,
FloatType,
ComplexType,
VectorType,
BoolType,
}Expand description
Contains all possible values types.
Variants
IntType
Type for i64
FloatType
Type for f64
ComplexType
Type for num::complex::Complex
VectorType
Type for Vec<Value>
BoolType
Type for bool
Implementations
sourceimpl ValueType
impl ValueType
sourcepub fn complexity(&self) -> u8
pub fn complexity(&self) -> u8
Returns a u8 higher the more complex the valuetype is. Useful for
comparisons.
sourcepub fn highest_complexity(types: Vec<&ValueType>) -> ValueType
pub fn highest_complexity(types: Vec<&ValueType>) -> ValueType
Returns the highest complexity value type of all one provided.
sourcepub fn lowest_complexity(types: Vec<&ValueType>) -> ValueType
pub fn lowest_complexity(types: Vec<&ValueType>) -> ValueType
Returns the lowest complexity value type of all the one provided.
Trait Implementations
impl Copy for ValueType
impl StructuralPartialEq for ValueType
Auto Trait Implementations
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnwindSafe for ValueType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more