Struct ExecutionSessionRef

Source
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<'_>

Source

pub unsafe fn from_inner(es: LLVMOrcExecutionSessionRef) -> Self

Wraps a raw pointer.

Source

pub fn as_inner(&self) -> LLVMOrcExecutionSessionRef

Unwraps the raw pointer.

Source

pub fn intern(&self, name: &CStr) -> SymbolStringPoolEntry

Intern a string in the ExecutionSession’s SymbolStringPool and return a reference to it.

Source

pub fn get_dylib_by_name(&self, name: &CStr) -> Option<JITDylibRef>

Returns the JITDylib with the given name, if any.

Source

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.

Source

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.

Source

pub fn set_default_error_reporter(&self)

Sets the default error reporter to the ExecutionSession.

Uses [tracing::error!] to log the error message.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more

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