pub struct ExecutionSessionRef<'ee> {
es: LLVMOrcExecutionSessionRef,
_marker: PhantomData<&'ee ()>,
}
Expand description
A JIT execution session reference.
Returned by LLJIT::get_execution_session
and
MaterializationResponsibilityRef::get_execution_session
.
ExecutionSession represents the JIT’d program and provides context for the JIT: It contains the JITDylibs, error reporting mechanisms, and dispatches the materializers.
See the ORCv2 docs.
Fields§
§es: LLVMOrcExecutionSessionRef
§_marker: PhantomData<&'ee ()>
Implementations§
Source§impl ExecutionSessionRef<'_>
impl ExecutionSessionRef<'_>
Sourcepub unsafe fn from_inner(es: LLVMOrcExecutionSessionRef) -> Self
pub unsafe fn from_inner(es: LLVMOrcExecutionSessionRef) -> Self
Wraps a raw pointer.
Sourcepub fn intern(&self, name: &CStr) -> SymbolStringPoolEntry
pub fn intern(&self, name: &CStr) -> SymbolStringPoolEntry
Intern a string in the ExecutionSession’s SymbolStringPool and return a reference to it.
Sourcepub fn get_dylib_by_name(&self, name: &CStr) -> Option<JITDylibRef>
pub fn get_dylib_by_name(&self, name: &CStr) -> Option<JITDylibRef>
Returns the JITDylib with the given name, if any.
Sourcepub fn create_bare_jit_dylib(&self, name: &CStr) -> JITDylibRef
pub fn create_bare_jit_dylib(&self, name: &CStr) -> JITDylibRef
Create a “bare” JITDylib.
The client is responsible for ensuring that the JITDylib’s name is unique.
This call does not install any library code or symbols into the newly created JITDylib. The client is responsible for all configuration.
Sourcepub fn create_jit_dylib(&self, name: &CStr) -> Result<JITDylibRef, LLVMString>
pub fn create_jit_dylib(&self, name: &CStr) -> Result<JITDylibRef, LLVMString>
Create a JITDylib.
The client is responsible for ensuring that the JITDylib’s name is unique.
If a Platform is attached to the ExecutionSession then Platform::setupJITDylib will be called to install standard platform symbols (e.g. standard library interposes). If no Platform is installed then this call is equivalent to Self::create_bare_jit_dylib and will always return success.
Sourcepub fn set_default_error_reporter(&self)
pub fn set_default_error_reporter(&self)
Sets the default error reporter to the ExecutionSession.
Uses [tracing::error!
] to log the error message.
Sourcepub fn set_error_reporter(&self, f: fn(_: &CStr))
pub fn set_error_reporter(&self, f: fn(_: &CStr))
Attach a custom error reporter function to the ExecutionSession.
Auto Trait Implementations§
impl<'ee> Freeze for ExecutionSessionRef<'ee>
impl<'ee> RefUnwindSafe for ExecutionSessionRef<'ee>
impl<'ee> !Send for ExecutionSessionRef<'ee>
impl<'ee> !Sync for ExecutionSessionRef<'ee>
impl<'ee> Unpin for ExecutionSessionRef<'ee>
impl<'ee> UnwindSafe for ExecutionSessionRef<'ee>
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
§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>
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>
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§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes