pub struct TreeTopology {
pub root: NodeId,
pub max_fanout: usize,
pub topology: PropagationTopology,
/* private fields */
}Expand description
Tree topology - hierarchical relay (P2P CDN-like)
Fields§
§root: NodeIdRoot node (broadcaster)
max_fanout: usizeMaximum children per node (fan-out)
topology: PropagationTopologyThe underlying topology
Implementations§
Source§impl TreeTopology
impl TreeTopology
Sourcepub fn remove_node(&mut self, node: NodeId)
pub fn remove_node(&mut self, node: NodeId)
Remove a node (and reassign its children)
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Get total node count
Trait Implementations§
Source§impl Clone for TreeTopology
impl Clone for TreeTopology
Source§fn clone(&self) -> TreeTopology
fn clone(&self) -> TreeTopology
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TreeTopology
impl RefUnwindSafe for TreeTopology
impl Send for TreeTopology
impl Sync for TreeTopology
impl Unpin for TreeTopology
impl UnsafeUnpin for TreeTopology
impl UnwindSafe for TreeTopology
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more