pub struct FunctionDef {
pub name: String,
pub entry: u32,
pub arity: u8,
pub num_registers: u8,
}Expand description
A callable entry point inside a Chunk: either bytecode-defined or a
slot reserved for a native (Rust) function registered with the runtime
via the FFI table (design notes §30-31).
Fields§
§name: String§entry: u32Index into Chunk::code where execution starts.
arity: u8Number of parameters, passed in registers r0..r{arity}.
num_registers: u8Upper bound on registers this function uses; the VM allocates exactly this many per call frame instead of a fixed worst-case size.
Trait Implementations§
Source§impl Clone for FunctionDef
impl Clone for FunctionDef
Source§fn clone(&self) -> FunctionDef
fn clone(&self) -> FunctionDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionDef
impl Debug for FunctionDef
Source§impl PartialEq for FunctionDef
impl PartialEq for FunctionDef
impl StructuralPartialEq for FunctionDef
Auto Trait Implementations§
impl Freeze for FunctionDef
impl RefUnwindSafe for FunctionDef
impl Send for FunctionDef
impl Sync for FunctionDef
impl Unpin for FunctionDef
impl UnsafeUnpin for FunctionDef
impl UnwindSafe for FunctionDef
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