Struct lovm2_core::gen::ModuleBuilder [−][src]
Representation of modules before lowering.
Implementations
impl ModuleBuilder
[src]
pub fn new() -> Self
[src]
Create a builder.
pub fn named<T>(name: T) -> Self where
T: ToString,
[src]
T: ToString,
Create a builder with a name.
pub fn with_meta<T>(meta: T) -> Self where
T: Into<ModuleMeta>,
[src]
T: Into<ModuleMeta>,
Create a builder with module meta information.
pub fn add_dependency<T>(&mut self, name: T) where
T: ToString,
[src]
T: ToString,
Add a module dependency for static inclusion.
pub fn add<T>(&mut self, name: T) -> &mut Hir where
T: Into<Variable>,
[src]
T: Into<Variable>,
Create a new function hir without arguments.
pub fn add_with_args<T>(&mut self, name: T, args: Vec<Variable>) -> &mut Hir where
T: Into<Variable>,
[src]
T: Into<Variable>,
Create a new function hir with arguments.
pub fn build(&self) -> Lovm2CompileResult<Module>
[src]
Generate a module from the current data. This uses the default CompileOptions e.g. optimization is enabled.
pub fn build_with_options(
&self,
options: CompileOptions
) -> Lovm2CompileResult<Module>
[src]
&self,
options: CompileOptions
) -> Lovm2CompileResult<Module>
Generate a module from the current data but use custom compile options.
pub fn entry(&mut self) -> &mut Hir
[src]
Create a new function handle with the ENTRY_POINT name.
Trait Implementations
impl Clone for ModuleBuilder
[src]
fn clone(&self) -> ModuleBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for ModuleBuilder
[src]
impl !Send for ModuleBuilder
[src]
impl !Sync for ModuleBuilder
[src]
impl Unpin for ModuleBuilder
[src]
impl !UnwindSafe for ModuleBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,