pub struct Functions<'a> { /* private fields */ }
Expand description
Intermediate representation of all the functions in a module.
Implementations§
Source§impl<'a> Functions<'a>
impl<'a> Functions<'a>
Sourcepub fn get_fn_by_id(&self, function_id: FunctionID) -> Option<&Function<'a>>
pub fn get_fn_by_id(&self, function_id: FunctionID) -> Option<&Function<'a>>
Get a function by its FunctionID
Sourcepub fn get_kind_mut(&mut self, function_id: FunctionID) -> &mut FuncKind<'a>
pub fn get_kind_mut(&mut self, function_id: FunctionID) -> &mut FuncKind<'a>
Get kind of function
Sourcepub fn get_type_id(&self, id: FunctionID) -> TypeID
pub fn get_type_id(&self, id: FunctionID) -> TypeID
Get the type ID of a function
Sourcepub fn is_deleted(&self, function_id: FunctionID) -> bool
pub fn is_deleted(&self, function_id: FunctionID) -> bool
Check if it’s deleted
Sourcepub fn get_mut(&mut self, function_id: FunctionID) -> &mut Function<'a>
pub fn get_mut(&mut self, function_id: FunctionID) -> &mut Function<'a>
Get mutable function by ID
Sourcepub fn unwrap_local(
&mut self,
function_id: FunctionID,
) -> &mut LocalFunction<'a>
pub fn unwrap_local( &mut self, function_id: FunctionID, ) -> &mut LocalFunction<'a>
Unwrap local function.
Sourcepub fn get_local_fid_by_name(&self, name: &str) -> Option<FunctionID>
pub fn get_local_fid_by_name(&self, name: &str) -> Option<FunctionID>
Get local Function ID by name
Sourcepub fn get_fn_modifier<'b>(
&'b mut self,
func_id: FunctionID,
) -> Option<FunctionModifier<'b, 'a>>
pub fn get_fn_modifier<'b>( &'b mut self, func_id: FunctionID, ) -> Option<FunctionModifier<'b, 'a>>
Get a function modifier from a function index
Sourcepub fn set_local_fn_name(&mut self, func_idx: FunctionID, name: String) -> bool
pub fn set_local_fn_name(&mut self, func_idx: FunctionID, name: String) -> bool
Set the name for a local function. Returns false if it is an imported function.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Functions<'a>
impl<'a> RefUnwindSafe for Functions<'a>
impl<'a> Send for Functions<'a>
impl<'a> Sync for Functions<'a>
impl<'a> Unpin for Functions<'a>
impl<'a> UnwindSafe for Functions<'a>
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