pub(super) struct LlvmBundleBuilder<ExecutionEngineBuilder_: for<'this> FnOnce(&'this Context) -> ExecutionEngine<'this>> {
pub(super) context: Context,
pub(super) execution_engine_builder: ExecutionEngineBuilder_,
}Expand description
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call build() to construct the actual struct. The fields of this struct should be used as follows:
| Field | Suggested Use |
|---|---|
context | Directly pass in the value this field should contain |
execution_engine_builder | Use a function or closure: (context: &_) -> execution_engine: _ |
Fields§
§context: Context§execution_engine_builder: ExecutionEngineBuilder_Implementations§
Source§impl<ExecutionEngineBuilder_: for<'this> FnOnce(&'this Context) -> ExecutionEngine<'this>> LlvmBundleBuilder<ExecutionEngineBuilder_>
impl<ExecutionEngineBuilder_: for<'this> FnOnce(&'this Context) -> ExecutionEngine<'this>> LlvmBundleBuilder<ExecutionEngineBuilder_>
Sourcepub(super) fn build(self) -> LlvmBundle
pub(super) fn build(self) -> LlvmBundle
Calls LlvmBundle::new() using the provided values. This is preferable over calling new() directly for the reasons listed above.
Auto Trait Implementations§
impl<ExecutionEngineBuilder_> Freeze for LlvmBundleBuilder<ExecutionEngineBuilder_>where
ExecutionEngineBuilder_: Freeze,
impl<ExecutionEngineBuilder_> RefUnwindSafe for LlvmBundleBuilder<ExecutionEngineBuilder_>where
ExecutionEngineBuilder_: RefUnwindSafe,
impl<ExecutionEngineBuilder_> Send for LlvmBundleBuilder<ExecutionEngineBuilder_>where
ExecutionEngineBuilder_: Send,
impl<ExecutionEngineBuilder_> !Sync for LlvmBundleBuilder<ExecutionEngineBuilder_>
impl<ExecutionEngineBuilder_> Unpin for LlvmBundleBuilder<ExecutionEngineBuilder_>where
ExecutionEngineBuilder_: Unpin,
impl<ExecutionEngineBuilder_> UnsafeUnpin for LlvmBundleBuilder<ExecutionEngineBuilder_>where
ExecutionEngineBuilder_: UnsafeUnpin,
impl<ExecutionEngineBuilder_> UnwindSafe for LlvmBundleBuilder<ExecutionEngineBuilder_>where
ExecutionEngineBuilder_: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more