pub struct NodeId(/* private fields */);Expand description
A 32-byte node identifier (Ed25519 public key).
Distinct from ContentHash at the type level; identical on the wire.
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. const to keep the newtype usable in const
contexts (and consistent with the sibling accessors below).
Trait Implementations§
impl Copy for NodeId
Source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
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
Source§impl Display for NodeId
Lowercase hex with no prefix — the same rendering as
iroh::PublicKey and iroh_blobs::Hash, so a log or span field
written from this type matches one written from the iroh type.
impl Display for NodeId
Lowercase hex with no prefix — the same rendering as
iroh::PublicKey and iroh_blobs::Hash, so a log or span field
written from this type matches one written from the iroh type.
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