pub struct UpVal { /* private fields */ }Expand description
Non-owning identity of a VM upvalue record.
§Safety model for unsafe methods
The upvalue, its value slot, and any stack used for rebasing must remain live in the same VM. Callers must preserve open-list ordering and closed storage state while moving or closing it.
Implementations§
Source§impl UpVal
impl UpVal
pub const fn allocation_size() -> usize
pub const unsafe fn from_raw(raw: NonNull<RawUpVal>) -> Self
pub unsafe fn from_ref(raw: &RawUpVal) -> Self
pub unsafe fn open_data(&self) -> UpValOpen
pub unsafe fn value_ptr(&self) -> *mut RawTValue
pub unsafe fn value(&self) -> TValue
pub unsafe fn closed_value(&self) -> TValue
pub unsafe fn set_value(&self, value: TValue)
pub unsafe fn rebase_value( &self, old_stack: TValueCursor, new_stack: TValueCursor, )
pub unsafe fn close(&self)
pub unsafe fn is_open(&self) -> bool
Trait Implementations§
impl Copy for UpVal
impl Eq for UpVal
impl StructuralPartialEq for UpVal
Auto Trait Implementations§
impl !Send for UpVal
impl !Sync for UpVal
impl Freeze for UpVal
impl RefUnwindSafe for UpVal
impl Unpin for UpVal
impl UnsafeUnpin for UpVal
impl UnwindSafe for UpVal
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