pub struct NodeRegistry {
pub nodes: Vec<NodeRegistryEntry>,
}Expand description
The shared node registry (committed to git, append-only).
Fields§
§nodes: Vec<NodeRegistryEntry>All registered nodes
Implementations§
Source§impl NodeRegistry
impl NodeRegistry
Sourcepub fn next_node_id(&self) -> u32
pub fn next_node_id(&self) -> u32
Get the next available node ID.
Sourcepub fn is_registered(&self, node_id: u32) -> bool
pub fn is_registered(&self, node_id: u32) -> bool
Check if a node ID is already registered.
Sourcepub fn get(&self, node_id: u32) -> Option<&NodeRegistryEntry>
pub fn get(&self, node_id: u32) -> Option<&NodeRegistryEntry>
Get a node entry by ID.
Trait Implementations§
Source§impl Clone for NodeRegistry
impl Clone for NodeRegistry
Source§fn clone(&self) -> NodeRegistry
fn clone(&self) -> NodeRegistry
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 moreSource§impl Debug for NodeRegistry
impl Debug for NodeRegistry
Source§impl Default for NodeRegistry
impl Default for NodeRegistry
Source§fn default() -> NodeRegistry
fn default() -> NodeRegistry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NodeRegistry
impl<'de> Deserialize<'de> for NodeRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NodeRegistry
impl RefUnwindSafe for NodeRegistry
impl Send for NodeRegistry
impl Sync for NodeRegistry
impl Unpin for NodeRegistry
impl UnsafeUnpin for NodeRegistry
impl UnwindSafe for NodeRegistry
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