[][src]Struct rust_ipv8::payloads::introductionrequestpayload::IntroductionRequestPayload

pub struct IntroductionRequestPayload {
    pub destination_address: Address,
    pub source_lan_address: Address,
    pub source_wan_address: Address,
    pub advice: bool,
    pub connection_type: ConnectionType,
    pub identifier: u16,
    pub extra_bytes: RawEnd,
}

The IntroductionRequestPayload is a payload used to send Introduction requests to other peers.

Fields

destination_address: Address

is the address of the receiver. Effectively this should be the wan address that others can use to contact the receiver.

source_lan_address: Address

is the lan address of the sender. Nodes in the same LAN should use this address to communicate.

source_wan_address: Address

is the wan address of the sender. Nodes not in the same LAN should use this address to communicate.

advice: bool

When True the receiver will introduce the sender to a new node. This introduction will be facilitated by the receiver sending a puncture-request to the new node.

connection_type: ConnectionType

indicates the connection type that the message creator has.

identifier: u16

is a number that must be given in the associated introduction-response. This number allows to distinguish between multiple introduction-response messages. NOTE: u16 is the max value given by the py-ipv8 implementation (https://github.com/Tribler/py-ipv8/blob/57c1aa73eee8a3b7ee6ad48482fc2e0d5849415e/ipv8/messaging/payload.py#L74)

extra_bytes: RawEnd

is a string that can be used to piggyback extra information.

Trait Implementations

impl Ipv8Payload for IntroductionRequestPayload[src]

impl PartialEq<IntroductionRequestPayload> for IntroductionRequestPayload[src]

impl Debug for IntroductionRequestPayload[src]

impl Serialize for IntroductionRequestPayload[src]

makes the IntroductionRequestPayload serializable. This is less than trivial as there is no 1:1 mapping between the serialized data and the payload struct. Some struct fields are combined into one byte to form the serialized data.

impl<'de> Deserialize<'de> for IntroductionRequestPayload[src]

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
    D: Deserializer<'de>, 
[src]

deserializes an IntroductionRequestPayload

Auto Trait Implementations

impl Unpin for IntroductionRequestPayload

impl Sync for IntroductionRequestPayload

impl Send for IntroductionRequestPayload

impl RefUnwindSafe for IntroductionRequestPayload

impl UnwindSafe for IntroductionRequestPayload

Blanket Implementations

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]