[−][src]Enum solana_libra_vm_runtime_types::value::ReferenceValue
The wrapper for all things reference in the VM. Right now we have 2 kind of references: local and global. This enum wraps both and offers a common API.
Variants
Reference(Reference)
GlobalRef(GlobalRef)
Methods
impl ReferenceValue
[src]
Implementation for reference opcodes.
A reference in the runtime can have different shapes so any time a reference is expected
a ReferenceValue
is created by popping whatever reference is on the stack.
Operations on the reference (via opcodes) are then invoked on a ReferenceValue
.
pub fn new(value: Value) -> VMResult<Self>
[src]
Create a ReferenceValue
from a Value
popped off the stack.
Fails if the value is not a reference of some kind.
pub fn borrow_field(self, field_offset: usize) -> VMResult<Value>
[src]
Borrow a field from the reference if the reference is to a struct.
pub fn read_ref(self) -> VMResult<Value>
[src]
Read the value pointed to by the reference.
pub fn write_ref(self, value: Value)
[src]
Write value
to the location pointed to by the reference.
Trait Implementations
impl Clone for ReferenceValue
[src]
fn clone(&self) -> ReferenceValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ReferenceValue
[src]
impl Eq for ReferenceValue
[src]
impl PartialEq<ReferenceValue> for ReferenceValue
[src]
fn eq(&self, other: &ReferenceValue) -> bool
[src]
fn ne(&self, other: &ReferenceValue) -> bool
[src]
impl StructuralEq for ReferenceValue
[src]
impl StructuralPartialEq for ReferenceValue
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ReferenceValue
impl !Send for ReferenceValue
impl !Sync for ReferenceValue
impl Unpin for ReferenceValue
impl !UnwindSafe for ReferenceValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,