pub struct TopologyNode {
pub node_id: String,
pub location: NodeLocation,
pub available: bool,
pub local_data: HashSet<String>,
}Expand description
A node registered in the topology.
Fields§
§node_id: StringUnique node identifier.
location: NodeLocationPhysical location.
available: boolWhether the node is currently available.
local_data: HashSet<String>Set of data block IDs this node holds locally.
Implementations§
Source§impl TopologyNode
impl TopologyNode
Sourcepub fn new(node_id: impl Into<String>, location: NodeLocation) -> Self
pub fn new(node_id: impl Into<String>, location: NodeLocation) -> Self
Create a new topology node.
Sourcepub fn add_local_data(&mut self, data_id: impl Into<String>)
pub fn add_local_data(&mut self, data_id: impl Into<String>)
Mark data as locally available on this node.
Sourcepub fn remove_local_data(&mut self, data_id: &str)
pub fn remove_local_data(&mut self, data_id: &str)
Remove a data block reference.
Trait Implementations§
Source§impl Clone for TopologyNode
impl Clone for TopologyNode
Source§fn clone(&self) -> TopologyNode
fn clone(&self) -> TopologyNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TopologyNode
impl RefUnwindSafe for TopologyNode
impl Send for TopologyNode
impl Sync for TopologyNode
impl Unpin for TopologyNode
impl UnsafeUnpin for TopologyNode
impl UnwindSafe for TopologyNode
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request