#[repr(C)]pub struct NrHostExt {
pub set_state: unsafe extern "C" fn(host_ctx: *mut c_void, sid: u64, key: NrStr, value: NrBytes) -> NrStatus,
pub get_state: unsafe extern "C" fn(host_ctx: *mut c_void, sid: u64, key: NrStr) -> NrVec<u8>,
}Expand description
Host extension table for state management. This is an optional extension that does not modify the core ABI.
Fields§
§set_state: unsafe extern "C" fn(host_ctx: *mut c_void, sid: u64, key: NrStr, value: NrBytes) -> NrStatusSet state for a given sid and key. Returns a status code indicating whether the state was stored.
get_state: unsafe extern "C" fn(host_ctx: *mut c_void, sid: u64, key: NrStr) -> NrVec<u8>Get state for a given sid and key. Returns an owned, empty vector if the key is not found.
Trait Implementations§
impl Copy for NrHostExt
impl Send for NrHostExt
impl Sync for NrHostExt
Auto Trait Implementations§
impl Freeze for NrHostExt
impl RefUnwindSafe for NrHostExt
impl Unpin for NrHostExt
impl UnsafeUnpin for NrHostExt
impl UnwindSafe for NrHostExt
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