#[repr(C)]pub struct HostVTable {
pub retain_context: unsafe extern "C" fn(u64) -> i32,
pub release_context: unsafe extern "C" fn(u64),
pub invoke: unsafe extern "C" fn(u64, *const u8, usize, *mut *mut u8, *mut usize) -> i32,
pub free_host_buf: unsafe extern "C" fn(*mut u8, usize),
}Expand description
Host callback function pointer table.
§Safety
- All function pointers remain valid from
actr_inituntil process exit. - The host guarantees serialized entry per guest instance.
- All buffers returned by
invokemust be released withfree_host_buf. - Context tokens remain valid while retained by the guest.
Fields§
§retain_context: unsafe extern "C" fn(u64) -> i32Retain a host bridge token for a cloned or background context.
release_context: unsafe extern "C" fn(u64)Release a previously retained host bridge token.
invoke: unsafe extern "C" fn(u64, *const u8, usize, *mut *mut u8, *mut usize) -> i32Invoke a host operation encoded as AbiFrame through a retained token.
free_host_buf: unsafe extern "C" fn(*mut u8, usize)Free a host-allocated buffer returned by invoke.
Auto Trait Implementations§
impl Freeze for HostVTable
impl RefUnwindSafe for HostVTable
impl Send for HostVTable
impl Sync for HostVTable
impl Unpin for HostVTable
impl UnsafeUnpin for HostVTable
impl UnwindSafe for HostVTable
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