#[repr(u8)]pub enum Value {
Int64(i64),
Float64(NotNan<f64>),
Bool(bool),
Vector(Vec<Value>),
}Variants§
Implementations§
Source§impl Value
impl Value
pub fn get_type(&self) -> Type
pub fn is_int(&self) -> bool
pub fn is_float(&self) -> bool
pub fn is_numeric(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_vector(&self) -> bool
pub fn unwrap_bool(&self) -> bool
pub fn unwrap_int64(&self) -> i64
pub fn unwrap_float64(&self) -> NotNan<f64>
pub fn unwrap_vector(&self) -> &Vec<Value>
pub fn apply_not(self) -> Value
pub fn apply_floor(self) -> Value
pub fn apply_ceil(self) -> Value
pub fn apply_abs(self) -> Value
pub fn apply_sgn(self) -> Value
pub fn apply_trc(self) -> Value
pub fn apply_minus(self) -> Value
pub fn apply_add(self, other: Value) -> Value
pub fn apply_sub(self, other: Value) -> Value
pub fn apply_mul(self, other: Value) -> Value
pub fn apply_floor_div(self, other: Value) -> Value
pub fn apply_real_div(self, other: Value) -> Value
pub fn apply_mod(self, other: Value) -> Value
pub fn apply_pow(self, other: Value) -> Value
pub fn apply_log(self, other: Value) -> Value
pub fn apply_min(self, other: Value) -> Value
pub fn apply_max(self, other: Value) -> Value
pub fn apply_cmp_eq(self, other: Value) -> Value
pub fn apply_cmp_ne(self, other: Value) -> Value
pub fn apply_cmp_lt(self, other: Value) -> Value
pub fn apply_cmp_le(self, other: Value) -> Value
pub fn apply_cmp_ge(self, other: Value) -> Value
pub fn apply_cmp_gt(self, other: Value) -> Value
pub fn apply_sin(self) -> Value
pub fn apply_cos(self) -> Value
pub fn apply_tan(self) -> Value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
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
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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<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.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