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§
Source§impl 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 Freeze for ValueType
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnwindSafe for ValueType
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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