Struct ln_types::node_id::NodeId [−][src]
pub struct NodeId(_);Expand description
Byte representation of a node identifier.
This type is used when referring to nodes without doing cryptographic operations. It can be used in search algorithms, LN explorers, manager UIs etc. By avoiding cryptography it is significantly more performant but may make debugging harder. It is therefore recommended to perform checking at system boundaries where performance is not very important - e.g. user inputs.
Implementations
Creates NodeId from raw byte representation.
Puts the byte representation into Vec<u8>.
This is meant for convenience around APIs that require Vec<u8>. Since it allocates it’s
best to avoid it if possible.
Trait Implementations
Same as Display
NodeId is deserialized as hex in human-readable formats and as bytes in non-human-readable.
Deserialize this value from the given Serde deserializer. Read more
Shows NodeId as hex
Performs the conversion.
Performs the conversion.
Supports BYTEA, TEXT, and VARCHAR.
Decoded as bytes if BYTEA is used, as hex string otherwise.
Expects hex representation
Same as Display
Writes human-readable description of the type to the writer. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
NodeId is serialized as hex in human-readable formats and as bytes in non-human-readable.
Supports BYTEA, TEXT, and VARCHAR.
Stored as bytes if BYTEA is used, as hex string otherwise.
Expects hex representation
Expects hex representation
Expects hex representation
As Display but with upper-case letters
Auto Trait Implementations
impl RefUnwindSafe for NodeId
impl UnwindSafe for NodeId
Blanket Implementations
pub fn base32_len(&self) -> usize
pub fn base32_len(&self) -> usize
Calculate the base32 serialized length
Mutably borrows from an owned value. Read more
Returns a reference to self as a ToSql trait object.