[][src]Struct tox_packet::onion::OnionAnnounceResponsePayload

pub struct OnionAnnounceResponsePayload {
    pub announce_status: AnnounceStatus,
    pub ping_id_or_pk: Digest,
    pub nodes: Vec<PackedNode>,
}

Unencrypted payload of OnionAnnounceResponse packet.

announce_status variable contains the result of sent request. It might have values:

  • 0: failed to announce ourselves or find requested node
  • 1: requested node is found by its long term PublicKey
  • 2: we successfully announced ourselves

In case of announce_status is equal to 1 ping_id will contain PublicKey that should be used to send data packets to the requested node. In other cases it will contain ping id that should be used for announcing ourselves.

Serialized form:

LengthContent
1announce_status (aka is_stored)
32Onion ping id or PublicKey
[0, 204]Nodes in packed format

Fields

announce_status: AnnounceStatus

Variable that represents result of sent OnionAnnounceRequest. Also known as is_stored variable

ping_id_or_pk: Digest

Onion ping id or PublicKey that should be used to send data packets

nodes: Vec<PackedNode>

Up to 4 closest to the requested PublicKey DHT nodes

Trait Implementations

impl Clone for OnionAnnounceResponsePayload[src]

impl Debug for OnionAnnounceResponsePayload[src]

impl Eq for OnionAnnounceResponsePayload[src]

impl FromBytes for OnionAnnounceResponsePayload[src]

impl PartialEq<OnionAnnounceResponsePayload> for OnionAnnounceResponsePayload[src]

impl StructuralEq for OnionAnnounceResponsePayload[src]

impl StructuralPartialEq for OnionAnnounceResponsePayload[src]

impl ToBytes for OnionAnnounceResponsePayload[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.