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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)