pub struct NodeId(/* private fields */);Expand description
A compressed pubkey which a node uses to sign announcements and decode HTLCs routed through it.
This type stores a simple byte array which is not checked for validity (i.e. that it describes
a point which lies on the secp256k1 curve), unlike PublicKey, as validity checking would
otherwise represent a large portion of NetworkGraph deserialization time (and RGS
application).
Implementations§
Source§impl NodeId
impl NodeId
Sourcepub fn from_pubkey(pubkey: &PublicKey) -> Self
pub fn from_pubkey(pubkey: &PublicKey) -> Self
Create a new NodeId from a public key
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self, DecodeError>
pub fn from_slice(bytes: &[u8]) -> Result<Self, DecodeError>
Create a new NodeId from a slice of bytes
Trait Implementations§
Source§impl Ord for NodeId
impl Ord for NodeId
Source§impl PartialOrd for NodeId
impl PartialOrd for NodeId
Source§impl Writeable for NodeId
impl Writeable for NodeId
impl Copy for NodeId
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LengthReadable for Twhere
T: Readable,
impl<T> LengthReadable for Twhere
T: Readable,
Source§fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
Reads a
Self in from the given LengthLimitedRead.