pub struct NodeId(pub u64);Expand description
A 64-bit Node ID (Core §2.5.5).
The value space is carved into ranges with different meanings, which NodeId::kind
reports. Not every 64-bit value is a legal operational Node ID.
Tuple Fields§
§0: u64Implementations§
Source§impl NodeId
impl NodeId
Sourcepub const UNSPECIFIED: Self
pub const UNSPECIFIED: Self
The Unspecified Node ID (§2.5.5.6).
Sourcepub const OPERATIONAL_MIN: u64 = 0x0000_0000_0000_0001
pub const OPERATIONAL_MIN: u64 = 0x0000_0000_0000_0001
The first operational Node ID.
Sourcepub const OPERATIONAL_MAX: u64 = 0xFFFF_FFEF_FFFF_FFFF
pub const OPERATIONAL_MAX: u64 = 0xFFFF_FFEF_FFFF_FFFF
The last operational Node ID.
Sourcepub const fn kind(self) -> NodeIdKind
pub const fn kind(self) -> NodeIdKind
Which range this value falls in.
Sourcepub const fn is_operational(self) -> bool
pub const fn is_operational(self) -> bool
Whether this is a usable operational Node ID.
Sourcepub const fn group(self) -> Option<GroupId>
pub const fn group(self) -> Option<GroupId>
The group this Node ID names, if it is a Group Node ID.
Sourcepub const fn from_group(group: GroupId) -> Self
pub const fn from_group(group: GroupId) -> Self
The Group Node ID for a group (§2.5.5.2).
Trait Implementations§
impl Copy for NodeId
impl Eq for NodeId
Source§impl Ord for NodeId
impl Ord for NodeId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for NodeId
impl PartialOrd for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnsafeUnpin for NodeId
impl UnwindSafe for NodeId
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