pub struct NodeId(/* private fields */);Expand description
A 32-byte node identity (FDD-03 §9.3). Minted once at node creation and
preserved across rename; encoded as a bytes field, not an object_id.
Implementations§
Source§impl NodeId
impl NodeId
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Wrap raw bytes as a node identity. Unchecked: accepts any 32 bytes, including
the reserved all-zero value. Intended for fixtures and round-trip
construction; production decode paths MUST use NodeId::try_from_bytes.
Sourcepub fn try_from_bytes(bytes: [u8; 32]) -> Result<Self>
pub fn try_from_bytes(bytes: [u8; 32]) -> Result<Self>
Wrap validated bytes as a node identity, rejecting the all-zero reserved value. Production operation decoders use this.
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
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