[][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_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 function 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> 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

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

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