pub struct NodePublicId { /* private fields */ }Expand description
A struct representing the public identity of a network Node.
It includes the Ed25519 public key and the optional BLS public key. This struct also provides
the Node’s network address, i.e. name() derived from the Ed25519 public key.
Implementations§
Source§impl PublicId
impl PublicId
Sourcepub fn ed25519_public_key(&self) -> &Ed25519PublicKey
pub fn ed25519_public_key(&self) -> &Ed25519PublicKey
Returns the Node’s Ed25519 public key.
Sourcepub fn bls_public_key(&self) -> &Option<BlsPublicKeyShare>
pub fn bls_public_key(&self) -> &Option<BlsPublicKeyShare>
Returns the Node’s BLS public key share.
Sourcepub fn encode_to_zbase32(&self) -> String
pub fn encode_to_zbase32(&self) -> String
Returns the PublicId serialised and encoded in z-base-32.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicId
impl<'de> Deserialize<'de> for PublicId
Source§fn deserialize<D: Deserializer<'de>>(deserialiser: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserialiser: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for PublicId
impl Ord for PublicId
Source§impl PartialOrd for PublicId
impl PartialOrd for PublicId
impl Eq for PublicId
impl StructuralPartialEq for PublicId
Auto Trait Implementations§
impl Freeze for PublicId
impl RefUnwindSafe for PublicId
impl Send for PublicId
impl Sync for PublicId
impl Unpin for PublicId
impl UnwindSafe for PublicId
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more