Struct poldercast::Topology[][src]

pub struct Topology { /* fields omitted */ }

Implementations

impl Topology[src]

pub fn new(profile: NodeProfile) -> Self[src]

create a new topology for the given NodeProfile.

the topology will manage a set of peers that is capped by the given cap default value of 1_024.

pub fn new_with(cap: usize, profile: NodeProfile) -> Self[src]

create a new topology for the given NodeProfile and capacity

The capacity will be the max number of entries in the topology. Removing the items that are the least recently used.

pub fn profile(&self) -> &NodeProfile[src]

pub fn add_layer<L>(&mut self, layer: L) where
    L: Layer + Send + Sync + 'static, 
[src]

pub fn set_policy<P>(&mut self, policy: P) where
    P: Policy + Send + Sync + 'static, 
[src]

pub fn view(
    &mut self,
    from: Option<Address>,
    selection: Selection
) -> Vec<Address>
[src]

pub fn initiate_gossips(&mut self, with: Address) -> Gossips[src]

pub fn force_reset_layers(&mut self)[src]

reset the layers, allowing an update of the internal state

pub fn accept_gossips(&mut self, from: Address, gossips: Gossips)[src]

pub fn exchange_gossips(&mut self, with: Address, gossips: Gossips) -> Gossips[src]

pub fn update_node<F>(&mut self, id: Address, update: F) -> Option<PolicyReport> where
    F: FnOnce(&mut Node), 
[src]

pub fn nodes(&self) -> &Nodes[src]

function to access the nodes data structure. From there it is possible to query the available nodes, the non-publicly-reachable nodes and the quarantined nodes.

Auto Trait Implementations

impl !RefUnwindSafe for Topology

impl Send for Topology

impl Sync for Topology

impl Unpin for Topology

impl !UnwindSafe for Topology

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> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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