pub struct NodePublicKey([u8; 32]);Expand description
A node’s Ed25519 public key (32 bytes, base64-encoded for display/storage).
Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl NodePublicKey
impl NodePublicKey
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Create from raw 32-byte key.
Sourcepub fn from_base64(s: &str) -> Result<Self, InvalidNodePublicKey>
pub fn from_base64(s: &str) -> Result<Self, InvalidNodePublicKey>
Parse from base64 string.
§Errors
Returns InvalidNodePublicKey when the value is not base64 or is not exactly 32 bytes.
Trait Implementations§
Source§impl Clone for NodePublicKey
impl Clone for NodePublicKey
Source§fn clone(&self) -> NodePublicKey
fn clone(&self) -> NodePublicKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodePublicKey
impl Debug for NodePublicKey
Source§impl Decode<'_, Postgres> for NodePublicKey
Available on crate feature sqlx only.
impl Decode<'_, Postgres> for NodePublicKey
Available on crate feature
sqlx only.Source§impl<'de> Deserialize<'de> for NodePublicKey
impl<'de> Deserialize<'de> for NodePublicKey
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 NodePublicKey
impl Display for NodePublicKey
Source§impl Encode<'_, Postgres> for NodePublicKey
Available on crate feature sqlx only.
impl Encode<'_, Postgres> for NodePublicKey
Available on crate feature
sqlx only.Source§fn encode_by_ref(
&self,
buf: &mut PgArgumentBuffer,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut PgArgumentBuffer, ) -> Result<IsNull, BoxDynError>
§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
Source§impl From<&VerifyingKey> for NodePublicKey
Available on crate feature crypto only.
impl From<&VerifyingKey> for NodePublicKey
Available on crate feature
crypto only.Source§impl From<VerifyingKey> for NodePublicKey
Available on crate feature crypto only.
impl From<VerifyingKey> for NodePublicKey
Available on crate feature
crypto only.Source§impl FromStr for NodePublicKey
impl FromStr for NodePublicKey
Source§impl Hash for NodePublicKey
impl Hash for NodePublicKey
Source§impl PartialEq for NodePublicKey
impl PartialEq for NodePublicKey
Source§impl PgHasArrayType for NodePublicKey
Available on crate feature sqlx only.
impl PgHasArrayType for NodePublicKey
Available on crate feature
sqlx only.fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
Source§impl Serialize for NodePublicKey
impl Serialize for NodePublicKey
Source§impl TryFrom<&NodePublicKey> for VerifyingKey
Available on crate feature crypto only.
impl TryFrom<&NodePublicKey> for VerifyingKey
Available on crate feature
crypto only.Source§impl TryFrom<String> for NodePublicKey
impl TryFrom<String> for NodePublicKey
Source§impl Type<Postgres> for NodePublicKey
Available on crate feature sqlx only.
impl Type<Postgres> for NodePublicKey
Available on crate feature
sqlx only.impl Eq for NodePublicKey
impl StructuralPartialEq for NodePublicKey
Auto Trait Implementations§
impl Freeze for NodePublicKey
impl RefUnwindSafe for NodePublicKey
impl Send for NodePublicKey
impl Sync for NodePublicKey
impl Unpin for NodePublicKey
impl UnsafeUnpin for NodePublicKey
impl UnwindSafe for NodePublicKey
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SpecConfig for T
impl<T> SpecConfig for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more