[−][src]Struct poldercast::Topology
Methods
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]
L: Layer + Send + Sync + 'static,
pub fn set_policy<P>(&mut self, policy: P) where
P: Policy + Send + Sync + 'static,
[src]
P: Policy + Send + Sync + 'static,
pub fn view(
&mut self,
from: Option<Address>,
selection: Selection
) -> Vec<Address>
[src]
&mut self,
from: Option<Address>,
selection: Selection
) -> Vec<Address>
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]
F: FnOnce(&mut Node),
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,