pub struct CallableJitFunction<F> { /* private fields */ }
Expand description
A JIT-compiled function that can be called directly
This structure wraps executable machine code and provides type-safe
calling methods. While the type parameter F
represents a Rust function
signature, the actual execution uses C ABI for stability.
§Supported Signatures
Currently supports function signatures with 0-7 arguments:
fn() -> R
fn(A1) -> R
fn(A1, A2) -> R
- … up to
fn(A1, A2, A3, A4, A5, A6, A7) -> R
For unsupported signatures, use RawCallableJitFunction
instead.
Implementations§
Source§impl<F> CallableJitFunction<F>
impl<F> CallableJitFunction<F>
Source§impl<R> CallableJitFunction<fn() -> R>
Direct call methods based on function signature
impl<R> CallableJitFunction<fn() -> R>
Direct call methods based on function signature
These methods provide type-safe calling with automatic ABI conversion from Rust function types to C ABI. Currently supports 0-7 arguments.
The conversion from fn(...)
to extern "C" fn(...)
is handled internally
for ABI stability across Rust versions.
Source§impl<A1, R> CallableJitFunction<fn(A1) -> R>
impl<A1, R> CallableJitFunction<fn(A1) -> R>
Source§impl<A1, A2, R> CallableJitFunction<fn(A1, A2) -> R>
impl<A1, A2, R> CallableJitFunction<fn(A1, A2) -> R>
Source§impl<A1, A2, A3, R> CallableJitFunction<fn(A1, A2, A3) -> R>
impl<A1, A2, A3, R> CallableJitFunction<fn(A1, A2, A3) -> R>
Source§impl<A1, A2, A3, A4, R> CallableJitFunction<fn(A1, A2, A3, A4) -> R>
impl<A1, A2, A3, A4, R> CallableJitFunction<fn(A1, A2, A3, A4) -> R>
Source§impl<A1, A2, A3, A4, A5, R> CallableJitFunction<fn(A1, A2, A3, A4, A5) -> R>
impl<A1, A2, A3, A4, A5, R> CallableJitFunction<fn(A1, A2, A3, A4, A5) -> R>
Source§impl<A1, A2, A3, A4, A5, A6, R> CallableJitFunction<fn(A1, A2, A3, A4, A5, A6) -> R>
impl<A1, A2, A3, A4, A5, A6, R> CallableJitFunction<fn(A1, A2, A3, A4, A5, A6) -> R>
Auto Trait Implementations§
impl<F> Freeze for CallableJitFunction<F>
impl<F> !RefUnwindSafe for CallableJitFunction<F>
impl<F> !Send for CallableJitFunction<F>
impl<F> !Sync for CallableJitFunction<F>
impl<F> Unpin for CallableJitFunction<F>where
F: Unpin,
impl<F> !UnwindSafe for CallableJitFunction<F>
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