#[repr(C)]pub struct PacketContext {
pub flags: u8,
pub hops: u8,
pub destination_hash: [u8; 16],
pub context: u8,
pub packet_hash: [u8; 32],
pub interface_id: u64,
pub data_offset: u32,
pub data_len: u32,
}Expand description
Packet context shared between host and WASM guest via linear memory.
Uses raw primitives (u64 for interface IDs, [u8; N] for hashes) so that
rns-hooks has zero dependency on rns-core.
Fields§
§flags: u8§hops: u8§destination_hash: [u8; 16]§context: u8§packet_hash: [u8; 32]§interface_id: u64§data_offset: u32Offset from the start of this struct to variable-length packet data.
data_len: u32Length of the variable-length packet data.
Trait Implementations§
Source§impl Clone for PacketContext
impl Clone for PacketContext
Source§fn clone(&self) -> PacketContext
fn clone(&self) -> PacketContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PacketContext
impl Debug for PacketContext
impl Copy for PacketContext
Auto Trait Implementations§
impl Freeze for PacketContext
impl RefUnwindSafe for PacketContext
impl Send for PacketContext
impl Sync for PacketContext
impl Unpin for PacketContext
impl UnsafeUnpin for PacketContext
impl UnwindSafe for PacketContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more