pub struct Context<'i> { /* private fields */ }Expand description
A loaded model: the HAL module plus the bytecode module from a .vmfb,
ready to resolve and invoke functions. Borrows its Instance.
Implementations§
Source§impl<'i> Context<'i>
impl<'i> Context<'i>
Sourcepub fn new(
instance: &'i Instance,
device: &Device,
vmfb: &'static [u8],
arena: &Arena,
) -> Result<Self>
pub fn new( instance: &'i Instance, device: &Device, vmfb: &'static [u8], arena: &Arena, ) -> Result<Self>
Load the model vmfb onto device, allocating from arena. The bytes
must outlive the context (use include_vmfb!).
Trait Implementations§
Auto Trait Implementations§
impl<'i> !Send for Context<'i>
impl<'i> !Sync for Context<'i>
impl<'i> Freeze for Context<'i>
impl<'i> RefUnwindSafe for Context<'i>
impl<'i> Unpin for Context<'i>
impl<'i> UnsafeUnpin for Context<'i>
impl<'i> UnwindSafe for Context<'i>
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