pub struct Function {
pub name: String,
pub param_count: u8,
pub register_count: u8,
pub is_method: bool,
pub chunk: Chunk,
pub upvalues: Vec<(bool, u8)>,
pub register_types: HashMap<u8, TypeKind>,
pub signature: Option<FunctionSignature>,
}Fields§
§name: String§param_count: u8§register_count: u8§is_method: bool§chunk: Chunk§upvalues: Vec<(bool, u8)>§register_types: HashMap<u8, TypeKind>§signature: Option<FunctionSignature>Implementations§
Source§impl Function
impl Function
pub fn new(name: impl Into<String>, param_count: u8, is_method: bool) -> Self
pub fn set_register_count(&mut self, count: u8)
pub fn add_upvalue(&mut self, is_local: bool, index: u8) -> u8
pub fn set_signature(&mut self, signature: FunctionSignature)
pub fn disassemble(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl !RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl !UnwindSafe for Function
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