Struct bytecode_interpreter::concrete::value::LocalSlot
source · pub struct LocalSlot { /* private fields */ }
Implementations§
source§impl LocalSlot
impl LocalSlot
sourcepub fn new_arg(name: String, val: TypedValue) -> Self
pub fn new_arg(name: String, val: TypedValue) -> Self
Create a local slot that holds a function argument
sourcepub fn new_tmp(name: String, ty: Type) -> Self
pub fn new_tmp(name: String, ty: Type) -> Self
Create a local slot that holds a function temporary
sourcepub fn get_value(&self) -> TypedValue
pub fn get_value(&self) -> TypedValue
Get the value held in this local slot. Panics if the slot does not hold a value
sourcepub fn put_value_override(&mut self, val: TypedValue)
pub fn put_value_override(&mut self, val: TypedValue)
Put the value held in this local slot. Override if the slot already holds a value
sourcepub fn put_value(&mut self, val: TypedValue)
pub fn put_value(&mut self, val: TypedValue)
Put the value held in this local slot. Panics if the slot already holds a value
sourcepub fn del_value(&mut self) -> TypedValue
pub fn del_value(&mut self) -> TypedValue
Delete the value held in this local slot. Panics if the slot does not hold a value
sourcepub fn get_content(&self) -> Option<&(BaseValue, Pointer)>
pub fn get_content(&self) -> Option<&(BaseValue, Pointer)>
Get the content of the slot, if any, return None of the slot does not currently hold a value
Trait Implementations§
source§impl PartialEq<LocalSlot> for LocalSlot
impl PartialEq<LocalSlot> for LocalSlot
impl Eq for LocalSlot
impl StructuralEq for LocalSlot
impl StructuralPartialEq for LocalSlot
Auto Trait Implementations§
impl RefUnwindSafe for LocalSlot
impl Send for LocalSlot
impl Sync for LocalSlot
impl Unpin for LocalSlot
impl UnwindSafe for LocalSlot
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.