Struct paralegal_spdg::node_cluster::NodeCluster
source · pub struct NodeCluster {
controller_id: Endpoint,
nodes: Box<[Node]>,
}
Expand description
A globally identified set of nodes that are all located in the same controller.
Sometimes it is more convenient to think about such a group instead of
individual GlobalNode
s
Fields§
§controller_id: Endpoint
§nodes: Box<[Node]>
Implementations§
source§impl NodeCluster
impl NodeCluster
sourcepub fn new(
controller_id: Endpoint,
nodes: impl IntoIterator<Item = Node>
) -> Self
pub fn new( controller_id: Endpoint, nodes: impl IntoIterator<Item = Node> ) -> Self
Create a new cluster. This for internal use.
sourcepub fn controller_id(&self) -> Endpoint
pub fn controller_id(&self) -> Endpoint
Controller that these nodes belong to
sourcepub fn try_from_iter(iter: impl IntoIterator<Item = GlobalNode>) -> Option<Self>
pub fn try_from_iter(iter: impl IntoIterator<Item = GlobalNode>) -> Option<Self>
Attempt to collect an iterator of nodes into a cluster
Returns None
if the iterator was empty or if two nodes did
not have identical controller id’s
Trait Implementations§
source§impl Clone for NodeCluster
impl Clone for NodeCluster
source§fn clone(&self) -> NodeCluster
fn clone(&self) -> NodeCluster
Returns a copy 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 moresource§impl Debug for NodeCluster
impl Debug for NodeCluster
source§impl Hash for NodeCluster
impl Hash for NodeCluster
source§impl<'a> IntoIterGlobalNodes for &'a NodeCluster
impl<'a> IntoIterGlobalNodes for &'a NodeCluster
§type Iter = Iter<'a>
type Iter = Iter<'a>
The iterator returned by
Self::iter_nodes
source§fn iter_nodes(self) -> Self::Iter
fn iter_nodes(self) -> Self::Iter
iterate over the local nodes
source§fn controller_id(self) -> Endpoint
fn controller_id(self) -> Endpoint
The controller id all of these nodes are located in.
source§fn iter_global_nodes(self) -> GlobalNodeIter<Self> ⓘ
fn iter_global_nodes(self) -> GlobalNodeIter<Self> ⓘ
Iterate all nodes as globally identified one’s. Read more
source§fn extended(self, other: impl IntoIterGlobalNodes) -> Option<NodeCluster>
fn extended(self, other: impl IntoIterGlobalNodes) -> Option<NodeCluster>
A convenience method for gathering multiple node(cluster)s together. Read more
source§fn to_local_cluster(self) -> NodeCluster
fn to_local_cluster(self) -> NodeCluster
Collect the iterator into a cluster
source§impl IntoIterator for NodeCluster
impl IntoIterator for NodeCluster
Auto Trait Implementations§
impl RefUnwindSafe for NodeCluster
impl Send for NodeCluster
impl Sync for NodeCluster
impl Unpin for NodeCluster
impl UnwindSafe for NodeCluster
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