pub enum Value {
Number(f32),
Bool(bool),
Text(String),
List(Vec<Value>),
None,
}
Variants§
Implementations§
Source§impl Value
impl Value
pub fn text(text: impl ToString) -> Value
pub fn is_none(&self) -> bool
pub fn bool_or_false(&self) -> bool
pub fn add(&self, other: &Self) -> Self
pub fn sub(&self, other: &Self) -> Self
pub fn mul(&self, other: &Self) -> Self
pub fn div(&self, other: &Self) -> Self
pub fn neg(&self) -> Self
pub fn not(&self) -> Self
pub fn or(&self, other: &Self) -> Self
pub fn and(&self, other: &Self) -> Self
pub fn less_than(&self, other: &Self) -> Self
pub fn less_equals(&self, other: &Self) -> Self
pub fn greater_than(&self, other: &Self) -> Self
pub fn greater_equals(&self, other: &Self) -> Self
pub fn equals(&self, other: &Self) -> Self
pub fn not_equals(&self, other: &Self) -> Self
Trait Implementations§
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