pub struct Invocation<'call, C>where
C: HostSchema,{ /* private fields */ }Expand description
Runs scripts while borrowing the application’s current host context.
Provided by Rustia::invoke for the duration of its
closure. Host callbacks receive only their allowed context views, without
a VM handle that would let them call back into Luau.
Implementations§
Source§impl<'call, C> Invocation<'call, C>where
C: HostSchema,
impl<'call, C> Invocation<'call, C>where
C: HostSchema,
Sourcepub const fn fuel_remaining(&self) -> u64
pub const fn fuel_remaining(&self) -> u64
Fuel remaining in the budget shared by every guest call in this invocation.
Sourcepub fn load<'chunk, 'source, S>(
&'chunk mut self,
source: &'source S,
) -> InvocationChunk<'chunk, 'call, 'source, C>
pub fn load<'chunk, 'source, S>( &'chunk mut self, source: &'source S, ) -> InvocationChunk<'chunk, 'call, 'source, C>
Creates a borrowed chunk builder using this invocation’s shared fuel budget and typed host dispatcher.
pub fn install(&mut self, module: &CompiledModule) -> Result<Exports>
Sourcepub fn call_entry<Return>(&mut self, entry: &CompiledEntry) -> Result<Return>where
Return: FromRustia,
pub fn call_entry<Return>(&mut self, entry: &CompiledEntry) -> Result<Return>where
Return: FromRustia,
Executes a precompiled stateless decision body directly.
Unlike install, this does not construct an exports
table, retain bytecode in the VM, or return handles that survive the
invocation. Host effects and slot writes remain transactional under the
surrounding invocation.
Trait Implementations§
Source§impl<C> Drop for Invocation<'_, C>where
C: HostSchema,
impl<C> Drop for Invocation<'_, C>where
C: HostSchema,
Auto Trait Implementations§
impl<'call, C> Freeze for Invocation<'call, C>
impl<'call, C> !RefUnwindSafe for Invocation<'call, C>
impl<'call, C> !Send for Invocation<'call, C>
impl<'call, C> !Sync for Invocation<'call, C>
impl<'call, C> Unpin for Invocation<'call, C>
impl<'call, C> UnsafeUnpin for Invocation<'call, C>
impl<'call, C> !UnwindSafe for Invocation<'call, C>
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