Enum tari_comms_dht::broadcast_strategy::BroadcastStrategy[][src]

pub enum BroadcastStrategy {
    DirectNodeId(Box<NodeId>),
    DirectPublicKey(Box<CommsPublicKey>),
    Flood(Vec<NodeId>),
    Random(usizeVec<NodeId>),
    Closest(Box<BroadcastClosestRequest>),
    Broadcast(Vec<NodeId>),
    Propagate(NodeDestinationVec<NodeId>),
}

Variants

DirectNodeId(Box<NodeId>)

Send to a particular peer matching the given node ID

DirectPublicKey(Box<CommsPublicKey>)

Send to a particular peer matching the given Public Key

Flood(Vec<NodeId>)

Send to all connected peers. If no peers are connected, no messages are sent.

Random(usizeVec<NodeId>)

Send to a random set of peers of size n that are Communication Nodes, excluding the given node IDs

Send to all n nearest Communication Nodes according to the given BroadcastClosestRequest

Broadcast(Vec<NodeId>)
Propagate(NodeDestinationVec<NodeId>)

Propagate to a set of closest neighbours and random peers

Implementations

impl BroadcastStrategy[src]

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

Returns true if this strategy will send multiple messages, otherwise false

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

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

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

pub fn into_direct_public_key(self) -> Option<Box<CommsPublicKey>>[src]

Trait Implementations

impl Clone for BroadcastStrategy[src]

impl Debug for BroadcastStrategy[src]

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

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

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

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

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<'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>,