Struct cranelift_module::ModuleNamespace
source · pub struct ModuleNamespace<'a, B: 'a>where
B: Backend,{ /* private fields */ }Expand description
This provides a view to the state of a module which allows ir::ExternalNames to be translated
into FunctionDeclarations and DataDeclarations.
Implementations
sourceimpl<'a, B> ModuleNamespace<'a, B>where
B: Backend,
impl<'a, B> ModuleNamespace<'a, B>where
B: Backend,
sourcepub fn get_function_decl(&self, name: &ExternalName) -> &FunctionDeclaration
pub fn get_function_decl(&self, name: &ExternalName) -> &FunctionDeclaration
Get the FunctionDeclaration for the function named by name.
sourcepub fn get_data_decl(&self, name: &ExternalName) -> &DataDeclaration
pub fn get_data_decl(&self, name: &ExternalName) -> &DataDeclaration
Get the DataDeclaration for the function named by name.
sourcepub fn get_function_definition(
&self,
name: &ExternalName
) -> (Option<&B::CompiledFunction>, &str, &Signature)
pub fn get_function_definition(
&self,
name: &ExternalName
) -> (Option<&B::CompiledFunction>, &str, &Signature)
Get the definition for the function named by name, along with its name
and signature.
sourcepub fn get_data_definition(
&self,
name: &ExternalName
) -> (Option<&B::CompiledData>, &str, bool)
pub fn get_data_definition(
&self,
name: &ExternalName
) -> (Option<&B::CompiledData>, &str, bool)
Get the definition for the data object named by name, along with its name
and writable flag
sourcepub fn is_function(&self, name: &ExternalName) -> bool
pub fn is_function(&self, name: &ExternalName) -> bool
Return whether name names a function, rather than a data object.
Auto Trait Implementations
impl<'a, B> RefUnwindSafe for ModuleNamespace<'a, B>where
<B as Backend>::CompiledData: RefUnwindSafe,
<B as Backend>::CompiledFunction: RefUnwindSafe,
impl<'a, B> Send for ModuleNamespace<'a, B>where
<B as Backend>::CompiledData: Sync,
<B as Backend>::CompiledFunction: Sync,
impl<'a, B> Sync for ModuleNamespace<'a, B>where
<B as Backend>::CompiledData: Sync,
<B as Backend>::CompiledFunction: Sync,
impl<'a, B> Unpin for ModuleNamespace<'a, B>
impl<'a, B> UnwindSafe for ModuleNamespace<'a, B>where
<B as Backend>::CompiledData: RefUnwindSafe,
<B as Backend>::CompiledFunction: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more