[][src]Struct ra_common::models::Packet

pub struct Packet {
    pub p_type: PacketType,
    pub id: u64,
    pub network_id: NetworkId,
    pub from_addr: String,
    pub to_addr: String,
    pub sig: String,
    pub delay_until: u64,
    pub min_delay: u64,
    pub max_delay: u64,
    pub headers: HashMap<String, String>,
    pub payload: String,
}

Fields

p_type: PacketTypeid: u64

Identification of this packet Normally used for Claim Checks

network_id: NetworkId

Network this packet was sent over

from_addr: String

Sender node's address

to_addr: String

Destination node's address

sig: String

Signature used to verify sender

delay_until: u64

Delay Until this time in milliseconds since epoch. If min_delay and max_delay > 0, include a random delay after delay_until between them.

min_delay: u64

Delay for this many milliseconds as a minimum

max_delay: u64

Delay for this many milliseconds as a maximum

headers: HashMap<String, String>

Meta-data used for assisting with network routing

payload: String

Data being sent

Methods

impl Packet[src]

pub fn new(
    packet_type: PacketType,
    net_id: NetworkId,
    from: String,
    to: String,
    signature: String
) -> Packet
[src]

Trait Implementations

impl Debug for Packet[src]

Auto Trait Implementations

impl RefUnwindSafe for Packet

impl Send for Packet

impl Sync for Packet

impl Unpin for Packet

impl UnwindSafe for Packet

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,