Enum tari_comms_dht::envelope::NodeDestination[][src]

pub enum NodeDestination {
    Unknown,
    PublicKey(Box<CommsPublicKey>),
    NodeId(Box<NodeId>),
}

Represents the ways a destination node can be represented.

Variants

Unknown

The sender has chosen not to disclose the message destination, or the destination is the peer being sent to.

PublicKey(Box<CommsPublicKey>)

Destined for a particular public key

NodeId(Box<NodeId>)

Destined for a particular node id, or network region

Implementations

impl NodeDestination[src]

pub fn to_inner_bytes(&self) -> Vec<u8>[src]

pub fn public_key(&self) -> Option<&CommsPublicKey>[src]

pub fn node_id(&self) -> Option<&NodeId>[src]

pub fn is_unknown(&self) -> bool[src]

pub fn equals_node_identity(&self, other: &NodeIdentity) -> bool[src]

Trait Implementations

impl Clone for NodeDestination[src]

impl Debug for NodeDestination[src]

impl Default for NodeDestination[src]

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

impl Display for NodeDestination[src]

impl Eq for NodeDestination[src]

impl From<NodeDestination> for Destination[src]

impl From<NodeId> for NodeDestination[src]

impl From<RistrettoPublicKey> for NodeDestination[src]

impl PartialEq<&'_ NodeId> for NodeDestination[src]

impl PartialEq<&'_ RistrettoPublicKey> for NodeDestination[src]

impl PartialEq<NodeDestination> for NodeDestination[src]

impl PartialEq<NodeId> for NodeDestination[src]

impl PartialEq<RistrettoPublicKey> for NodeDestination[src]

impl Serialize for NodeDestination[src]

impl StructuralEq for NodeDestination[src]

impl StructuralPartialEq for NodeDestination[src]

impl TryFrom<Destination> for NodeDestination[src]

type Error = ByteArrayError

The type returned in the event of a conversion error.

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, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

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

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

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Instrument for T[src]

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

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> IntoSql for T[src]

impl<T> MessageFormat for T where
    T: DeserializeOwned + Serialize
[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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>,