pub enum Variable {
String(Arc<String>),
Integer(i64),
Float(f64),
Array(Arc<Vec<Variable>>),
}
Variants§
Implementations§
source§impl Variable
impl Variable
pub fn op_add(self, other: Variable) -> Variable
pub fn op_subtract(self, other: Variable) -> Variable
pub fn op_multiply(self, other: Variable) -> Variable
pub fn op_divide(self, other: Variable) -> Variable
pub fn op_and(self, other: Variable) -> Variable
pub fn op_or(self, other: Variable) -> Variable
pub fn op_xor(self, other: Variable) -> Variable
pub fn op_eq(self, other: Variable) -> Variable
pub fn op_ne(self, other: Variable) -> Variable
pub fn op_lt(self, other: Variable) -> Variable
pub fn op_le(self, other: Variable) -> Variable
pub fn op_gt(self, other: Variable) -> Variable
pub fn op_ge(self, other: Variable) -> Variable
pub fn op_not(self) -> Variable
pub fn op_minus(self) -> Variable
pub fn parse_number(&self) -> Variable
pub fn to_bool(&self) -> bool
source§impl Variable
impl Variable
pub fn to_string(&self) -> Cow<'_, str>
pub fn to_number(&self) -> Number
pub fn to_number_checked(&self) -> Option<Number>
pub fn to_integer(&self) -> i64
pub fn to_usize(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_array(&self) -> Option<&[Variable]>
pub fn into_array(self) -> Arc<Vec<Variable>>
pub fn to_array(&self) -> Arc<Vec<Variable>>
pub fn into_string_array(self) -> Vec<String>
pub fn to_string_array(&self) -> Vec<Cow<'_, str>>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Variable
impl<'de> Deserialize<'de> for Variable
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 Ord for Variable
impl Ord for Variable
source§impl PartialEq for Variable
impl PartialEq for Variable
source§impl PartialOrd for Variable
impl PartialOrd for Variable
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 moreimpl Eq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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