Struct cranelift_module::ModuleDeclarations[][src]

pub struct ModuleDeclarations { /* fields omitted */ }

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

Implementations

impl ModuleDeclarations[src]

pub fn get_name(&self, name: &str) -> Option<FuncOrDataId>[src]

Get the module identifier for a given name, if that name has been declared.

pub fn get_functions(
    &self
) -> impl Iterator<Item = (FuncId, &FunctionDeclaration)>
[src]

Get an iterator of all function declarations

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

Return whether name names a function, rather than a data object.

pub fn get_function_decl(&self, func_id: FuncId) -> &FunctionDeclaration[src]

Get the FunctionDeclaration for the function named by name.

pub fn get_data_objects(
    &self
) -> impl Iterator<Item = (DataId, &DataDeclaration)>
[src]

Get an iterator of all data declarations

pub fn get_data_decl(&self, data_id: DataId) -> &DataDeclaration[src]

Get the DataDeclaration for the data object named by name.

pub fn declare_function(
    &mut self,
    name: &str,
    linkage: Linkage,
    signature: &Signature
) -> ModuleResult<(FuncId, &FunctionDeclaration)>
[src]

Declare a function in this module.

pub fn declare_data(
    &mut self,
    name: &str,
    linkage: Linkage,
    writable: bool,
    tls: bool
) -> ModuleResult<(DataId, &DataDeclaration)>
[src]

Declare a data object in this module.

Trait Implementations

impl Debug for ModuleDeclarations[src]

impl Default for ModuleDeclarations[src]

Auto Trait Implementations

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.