Enum interpreter::value::Value
source · pub enum Value {
Integer(i64),
Float(f64),
Boolean(bool),
String(String),
Function(Function),
Null,
}
Variants§
Implementations§
source§impl Value
impl Value
pub fn variant_name(&self) -> &'static str
pub fn cast_to_boolean(&self) -> Result<Self, Error>
pub fn cast_to_string(&self) -> Self
pub fn eq(&self, other: &Self) -> Result<Self, Error>
pub fn ne(&self, other: &Self) -> Result<Self, Error>
pub fn lt(&self, other: &Self) -> Result<Self, Error>
pub fn le(&self, other: &Self) -> Result<Self, Error>
pub fn gt(&self, other: &Self) -> Result<Self, Error>
pub fn ge(&self, other: &Self) -> Result<Self, Error>
pub fn not(&self) -> Result<Self, Error>
pub fn and(&self, other: &Self) -> Result<Self, Error>
pub fn or(&self, other: &Self) -> Result<Self, Error>
pub fn sub(&self, other: &Self) -> Result<Self, Error>
pub fn mul(&self, other: &Self) -> Result<Self, Error>
pub fn rem(&self, other: &Self) -> Result<Self, Error>
pub fn add(&self, other: &Self) -> Result<Self, Error>
pub fn div(&self, other: &Self) -> Result<Self, Error>
pub fn neg(&self) -> Result<Self, Error>
Trait Implementations§
source§impl PartialEq for Value
impl PartialEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
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