pub enum ActionWire {
SendOnInterface {
interface: u64,
raw: Vec<u8>,
},
BroadcastOnAllInterfaces {
raw: Vec<u8>,
exclude: u64,
has_exclude: u8,
},
DeliverLocal {
destination_hash: [u8; 16],
raw: Vec<u8>,
packet_hash: [u8; 32],
receiving_interface: u64,
},
AnnounceReceived {
destination_hash: [u8; 16],
identity_hash: [u8; 16],
public_key: [u8; 64],
name_hash: [u8; 10],
random_hash: [u8; 10],
app_data: Option<Vec<u8>>,
hops: u8,
receiving_interface: u64,
},
PathUpdated {
destination_hash: [u8; 16],
hops: u8,
next_hop: [u8; 16],
interface: u64,
},
ForwardToLocalClients {
raw: Vec<u8>,
exclude: u64,
has_exclude: u8,
},
ForwardPlainBroadcast {
raw: Vec<u8>,
to_local: u8,
exclude: u64,
has_exclude: u8,
},
CacheAnnounce {
packet_hash: [u8; 32],
raw: Vec<u8>,
},
TunnelSynthesize {
interface: u64,
data: Vec<u8>,
dest_hash: [u8; 16],
},
TunnelEstablished {
tunnel_id: [u8; 32],
interface: u64,
},
}Expand description
Wire-format enum mirroring TransportAction with raw primitives.
Uses u64 for interface IDs and [u8; N] for hashes so that rns-hooks
has zero dependency on rns-core. Conversions happen at call sites.
Data fields use owned Vec<u8> — the data is copied from WASM linear memory
when the action is parsed, so ActionWire values remain valid after the store
is dropped.
Variants§
SendOnInterface
BroadcastOnAllInterfaces
DeliverLocal
AnnounceReceived
Fields
PathUpdated
ForwardToLocalClients
ForwardPlainBroadcast
CacheAnnounce
TunnelSynthesize
TunnelEstablished
Trait Implementations§
Source§impl Clone for ActionWire
impl Clone for ActionWire
Source§fn clone(&self) -> ActionWire
fn clone(&self) -> ActionWire
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 moreAuto Trait Implementations§
impl Freeze for ActionWire
impl RefUnwindSafe for ActionWire
impl Send for ActionWire
impl Sync for ActionWire
impl Unpin for ActionWire
impl UnsafeUnpin for ActionWire
impl UnwindSafe for ActionWire
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