Enum som_interpreter_bc::value::Value
source · pub enum Value {
}
Expand description
Represents an SOM value.
Variants§
Nil
The nil value.
System
The system value.
Boolean(bool)
A boolean value (true or false).
Integer(i64)
An integer value.
BigInteger(BigInt)
A big integer value (arbitrarily big).
Double(f64)
An floating-point value.
Symbol(Interned)
An interned symbol value.
String(Rc<String>)
A string value.
Array(SOMRef<Vec<Self>>)
An array of values.
Block(Rc<Block>)
A block value, ready to be evaluated.
Instance(SOMRef<Instance>)
A generic (non-primitive) class instance.
Class(SOMRef<Class>)
A bare class object.
Invokable(Rc<Method>)
A bare invokable.
Implementations§
source§impl Value
impl Value
sourcepub fn lookup_method(
&self,
universe: &Universe,
signature: Interned
) -> Option<Rc<Method>>
pub fn lookup_method( &self, universe: &Universe, signature: Interned ) -> Option<Rc<Method>>
Search for a given method for this value.
sourcepub fn lookup_local(&self, idx: usize) -> Option<Self>
pub fn lookup_local(&self, idx: usize) -> Option<Self>
Search for a local binding within this value.
sourcepub fn assign_local(&mut self, idx: usize, value: Self) -> Option<()>
pub fn assign_local(&mut self, idx: usize, value: Self) -> Option<()>
Assign a value to a local binding within this value.
Trait Implementations§
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