Struct cranelift_module::DataContext[][src]

pub struct DataContext { /* fields omitted */ }
Expand description

This is to data objects what cranelift_codegen::Context is to functions.

Implementations

Allocate a new context.

Clear all data structures in this context.

Define a zero-initialized object with the given size.

Define an object initialized with the given contents.

TODO: Can we avoid a Box here?

Override the segment/section for data, only supported on Object backend

Set the alignment for data. The alignment must be a power of two.

Declare an external function import.

Users of the Module API generally should call Module::declare_func_in_data instead, as it takes care of generating the appropriate ExternalName.

Declares a global value import.

TODO: Rename to import_data?

Users of the Module API generally should call Module::declare_data_in_data instead, as it takes care of generating the appropriate ExternalName.

Write the address of func into the data at offset offset.

Write the address of data into the data at offset offset.

Reference the initializer data.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.