pub struct FunctionChunk {
pub chunk: Chunk,
pub name: Option<String>,
pub arity: usize,
pub fn_type: FunctionType,
pub upvalues: Option<Vec<UpValue>>,
}
Expand description
Compile time representation of a function, ie its code, name, resolved closure information
Fields§
§chunk: Chunk
§name: Option<String>
§arity: usize
§fn_type: FunctionType
§upvalues: Option<Vec<UpValue>>
Implementations§
Source§impl FunctionChunk
impl FunctionChunk
pub fn new( name: Option<String>, arity: usize, fn_type: FunctionType, ) -> FunctionChunk
pub fn set_upvalues(&mut self, upvalues: Vec<UpValue>)
Trait Implementations§
Source§impl Clone for FunctionChunk
impl Clone for FunctionChunk
Source§fn clone(&self) -> FunctionChunk
fn clone(&self) -> FunctionChunk
Returns a duplicate of the value. Read more
1.0.0 · 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 FunctionChunk
impl Debug for FunctionChunk
Source§impl<'de> Deserialize<'de> for FunctionChunk
impl<'de> Deserialize<'de> for FunctionChunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FunctionChunk
impl PartialEq for FunctionChunk
Source§impl Serialize for FunctionChunk
impl Serialize for FunctionChunk
impl StructuralPartialEq for FunctionChunk
Auto Trait Implementations§
impl Freeze for FunctionChunk
impl RefUnwindSafe for FunctionChunk
impl Send for FunctionChunk
impl Sync for FunctionChunk
impl Unpin for FunctionChunk
impl UnwindSafe for FunctionChunk
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