pub struct Proto { /* private fields */ }Expand description
Non-owning identity of a VM prototype record.
§Safety model for unsafe methods
The proto and all referenced arrays and objects must remain live. Program counters and indices must be in bounds for their corresponding arrays, and code mutation must preserve a valid bytecode graph.
Implementations§
Source§impl Proto
impl Proto
pub const unsafe fn from_raw(raw: NonNull<RawProto>) -> Self
pub unsafe fn source(&self) -> Option<TString>
pub unsafe fn debug_name(&self) -> Option<TString>
pub unsafe fn upvalue_name(&self, index: usize) -> Option<TString>
pub unsafe fn child_proto(&self, index: usize) -> Option<Self>
pub unsafe fn gc_list(&self) -> Option<GcObject>
pub unsafe fn set_gc_list(&self, gc_list: Option<GcObject>)
pub unsafe fn loc_var(&self, index: usize) -> Option<LocVar>
pub unsafe fn constants(&self) -> TValueCursor
pub unsafe fn constant(&self, index: usize) -> TValue
pub unsafe fn feedback_slot( &self, index: usize, ) -> Option<NonNull<FeedbackVectorSlot>>
pub unsafe fn code_at(&self, index: usize) -> u32
pub unsafe fn set_code_at(&self, index: usize, value: u32)
Trait Implementations§
impl Copy for Proto
impl Eq for Proto
impl StructuralPartialEq for Proto
Auto Trait Implementations§
impl !Send for Proto
impl !Sync for Proto
impl Freeze for Proto
impl RefUnwindSafe for Proto
impl Unpin for Proto
impl UnsafeUnpin for Proto
impl UnwindSafe for Proto
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