pub struct GlobalNode {
pub(crate) node: Node,
pub(crate) controller_id: Endpoint,
}
Expand description
A globally identified node in an SPDG
Fields§
§node: Node
§controller_id: Endpoint
Implementations§
Source§impl GlobalNode
impl GlobalNode
Sourcepub fn unsafe_new(ctrl_id: Endpoint, index: usize) -> Self
pub fn unsafe_new(ctrl_id: Endpoint, index: usize) -> Self
Create a new node with no guarantee that it exists in the SPDG of the controller.
Sourcepub fn from_local_node(ctrl_id: Endpoint, node: Node) -> Self
pub fn from_local_node(ctrl_id: Endpoint, node: Node) -> Self
Create a new globally identified node by pairing a node local to a particular SPDG with it’s controller id.
Meant for internal use only.
Sourcepub fn local_node(self) -> Node
pub fn local_node(self) -> Node
The local node in the SPDG
Sourcepub fn controller_id(self) -> Endpoint
pub fn controller_id(self) -> Endpoint
The identifier for the SPDG this node is contained in
Trait Implementations§
Source§impl Clone for GlobalNode
impl Clone for GlobalNode
Source§fn clone(&self) -> GlobalNode
fn clone(&self) -> GlobalNode
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 GlobalNode
impl Debug for GlobalNode
Source§impl Hash for GlobalNode
impl Hash for GlobalNode
Source§impl IntoIterGlobalNodes for GlobalNode
impl IntoIterGlobalNodes for GlobalNode
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 PartialEq for GlobalNode
impl PartialEq for GlobalNode
impl Copy for GlobalNode
impl Eq for GlobalNode
impl StructuralPartialEq for GlobalNode
Auto Trait Implementations§
impl Freeze for GlobalNode
impl RefUnwindSafe for GlobalNode
impl Send for GlobalNode
impl Sync for GlobalNode
impl Unpin for GlobalNode
impl UnwindSafe for GlobalNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more