[][src]Struct cranelift_module::ModuleNamespace

pub struct ModuleNamespace<'a, B: 'a> where
    B: Backend
{ /* fields omitted */ }

This provides a view to the state of a module which allows ir::ExternalNames to be translated into FunctionDeclarations and DataDeclarations.

Methods

impl<'a, B> ModuleNamespace<'a, B> where
    B: Backend
[src]

pub fn get_function_id(&self, name: &ExternalName) -> FuncId[src]

Get the FuncId for the function named by name.

pub fn get_data_id(&self, name: &ExternalName) -> DataId[src]

Get the DataId for the data object named by name.

pub fn get_function_decl(&self, name: &ExternalName) -> &FunctionDeclaration[src]

Get the FunctionDeclaration for the function named by name.

pub fn get_data_decl(&self, name: &ExternalName) -> &DataDeclaration[src]

Get the DataDeclaration for the data object named by name.

pub fn get_function_definition(
    &self,
    name: &ExternalName
) -> (Option<&B::CompiledFunction>, &str, &Signature)
[src]

Get the definition for the function named by name, along with its name and signature.

pub fn get_data_definition(
    &self,
    name: &ExternalName
) -> (Option<&B::CompiledData>, &str, bool)
[src]

Get the definition for the data object named by name, along with its name and writable flag

pub fn is_function(&self, name: &ExternalName) -> bool[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.