pub(super) struct LlvmBundleTryBuilder<ExecutionEngineBuilder_: for<'this> FnOnce(&'this Context) -> Result<ExecutionEngine<'this>, Error_>, Error_> {
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 try_build() or try_build_or_recover() 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: &_) -> Result<execution_engine: _, Error_> |
Fields§
§context: Context§execution_engine_builder: ExecutionEngineBuilder_Implementations§
Source§impl<ExecutionEngineBuilder_: for<'this> FnOnce(&'this Context) -> Result<ExecutionEngine<'this>, Error_>, Error_> LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>
impl<ExecutionEngineBuilder_: for<'this> FnOnce(&'this Context) -> Result<ExecutionEngine<'this>, Error_>, Error_> LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>
Sourcepub(super) fn try_build(self) -> Result<LlvmBundle, Error_>
pub(super) fn try_build(self) -> Result<LlvmBundle, Error_>
Calls LlvmBundle::try_new() using the provided values. This is preferable over calling try_new() directly for the reasons listed above.
Sourcepub(super) fn try_build_or_recover(self) -> Result<LlvmBundle, (Error_, Heads)>
pub(super) fn try_build_or_recover(self) -> Result<LlvmBundle, (Error_, Heads)>
Calls LlvmBundle::try_new_or_recover() using the provided values. This is preferable over calling try_new_or_recover() directly for the reasons listed above.
Auto Trait Implementations§
impl<ExecutionEngineBuilder_, Error_> Freeze for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>where
ExecutionEngineBuilder_: Freeze,
impl<ExecutionEngineBuilder_, Error_> RefUnwindSafe for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>where
ExecutionEngineBuilder_: RefUnwindSafe,
impl<ExecutionEngineBuilder_, Error_> Send for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>where
ExecutionEngineBuilder_: Send,
impl<ExecutionEngineBuilder_, Error_> !Sync for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>
impl<ExecutionEngineBuilder_, Error_> Unpin for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>where
ExecutionEngineBuilder_: Unpin,
impl<ExecutionEngineBuilder_, Error_> UnsafeUnpin for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>where
ExecutionEngineBuilder_: UnsafeUnpin,
impl<ExecutionEngineBuilder_, Error_> UnwindSafe for LlvmBundleTryBuilder<ExecutionEngineBuilder_, Error_>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