Struct gluon_vm::thread::RootedValue
source · Expand description
A rooted value
Implementations
sourceimpl<T> RootedValue<T>where
T: Deref<Target = Thread>,
impl<T> RootedValue<T>where
T: Deref<Target = Thread>,
pub fn re_root<'vm, U>(&self, vm: U) -> Result<RootedValue<U>>where
U: VmRoot<'vm>,
pub fn get_variant(&self) -> Variants<'_>
pub fn get_value(&self) -> Value
pub fn vm(&self) -> &Thread
pub fn clone_vm(&self) -> Twhere
T: Clone,
sourcepub fn get<'vm>(&'vm self, index: usize) -> Option<RootedValue<T>>where
T: VmRoot<'vm>,
pub fn get<'vm>(&'vm self, index: usize) -> Option<RootedValue<T>>where
T: VmRoot<'vm>,
looks up the field at the given offset
sourcepub fn get_field<'vm>(&'vm self, name: &str) -> Option<RootedValue<T>>where
T: VmRoot<'vm>,
pub fn get_field<'vm>(&'vm self, name: &str) -> Option<RootedValue<T>>where
T: VmRoot<'vm>,
looks up the record field with the given name
pub fn as_ref(&self) -> RootedValue<&Thread>
Trait Implementations
sourceimpl<T> Debug for RootedValue<T>where
T: Deref<Target = Thread>,
impl<T> Debug for RootedValue<T>where
T: Deref<Target = Thread>,
sourceimpl<T> Drop for RootedValue<T>where
T: Deref<Target = Thread>,
impl<T> Drop for RootedValue<T>where
T: Deref<Target = Thread>,
sourceimpl<'vm, 'value, T> Getable<'vm, 'value> for RootedValue<T>where
T: Deref<Target = Thread> + VmRoot<'vm>,
impl<'vm, 'value, T> Getable<'vm, 'value> for RootedValue<T>where
T: Deref<Target = Thread> + VmRoot<'vm>,
fn from_value(vm: &'vm Thread, value: Variants<'value>) -> Self
sourceimpl<T, U> PartialEq<RootedValue<U>> for RootedValue<T>where
T: Deref<Target = Thread>,
U: Deref<Target = Thread>,
impl<T, U> PartialEq<RootedValue<U>> for RootedValue<T>where
T: Deref<Target = Thread>,
U: Deref<Target = Thread>,
sourcefn eq(&self, other: &RootedValue<U>) -> bool
fn eq(&self, other: &RootedValue<U>) -> bool
sourceimpl<'vm, T> Pushable<'vm> for RootedValue<T>where
T: Deref<Target = Thread>,
impl<'vm, T> Pushable<'vm> for RootedValue<T>where
T: Deref<Target = Thread>,
sourcefn push(self, context: &mut ActiveThread<'vm>) -> Result<()>
fn push(self, context: &mut ActiveThread<'vm>) -> Result<()>
Pushes
self
to stack
. If the call is successful a single element should have been added
to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intact Read morefn status_push(self, context: &mut ActiveThread<'vm>) -> Statuswhere
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value>where
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>>where
Self: Sized,
T: VmRoot<'vm>,
Auto Trait Implementations
impl<T> !RefUnwindSafe for RootedValue<T>
impl<T> Send for RootedValue<T>where
T: Send,
impl<T> Sync for RootedValue<T>where
T: Sync,
impl<T> Unpin for RootedValue<T>where
T: Unpin,
impl<T> !UnwindSafe for RootedValue<T>
Blanket Implementations
sourceimpl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
impl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
sourcefn async_push(
self,
context: &mut ActiveThread<'vm>,
_: u32
) -> Result<Async<()>, Error>
fn async_push(
self,
context: &mut ActiveThread<'vm>,
_: u32
) -> Result<Async<()>, Error>
Pushes
self
to stack
. If the call is successful a single element should have been added
to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intact. Read morefn async_status_push(
self,
context: &mut ActiveThread<'vm>,
frame_index: VmIndex
) -> Statuswhere
Self: Sized,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more