pub struct NodeId(/* private fields */);Expand description
A 33-byte compressed public key representing a node ID.
Implementations§
Source§impl NodeId
impl NodeId
Sourcepub fn from_bytes(bytes: [u8; 33]) -> Self
pub fn from_bytes(bytes: [u8; 33]) -> Self
Create from bytes.
Sourcepub fn from_hex(hex: &str) -> Result<Self, LightningError>
pub fn from_hex(hex: &str) -> Result<Self, LightningError>
Create from hex string.
Sourcepub fn to_public_key(&self) -> Result<PublicKey, LightningError>
pub fn to_public_key(&self) -> Result<PublicKey, LightningError>
Get the public key.
Trait Implementations§
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