pub struct NostrPublicKey { /* private fields */ }Expand description
A validated lowercase hexadecimal Nostr public key.
Implementations§
Source§impl NostrPublicKey
impl NostrPublicKey
Sourcepub fn from_hex(value: &str) -> Result<Self, SoftchatError>
pub fn from_hex(value: &str) -> Result<Self, SoftchatError>
Parse one 32-byte hexadecimal x-only public key.
§Errors
Returns SoftchatError::InvalidPublicKey when value is not a
valid public key.
Trait Implementations§
Source§impl Clone for NostrPublicKey
impl Clone for NostrPublicKey
Source§fn clone(&self) -> NostrPublicKey
fn clone(&self) -> NostrPublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NostrPublicKey
impl Debug for NostrPublicKey
Source§impl Display for NostrPublicKey
impl Display for NostrPublicKey
Source§impl FromStr for NostrPublicKey
impl FromStr for NostrPublicKey
Source§impl Hash for NostrPublicKey
impl Hash for NostrPublicKey
Source§impl PartialEq for NostrPublicKey
impl PartialEq for NostrPublicKey
Source§fn eq(&self, other: &NostrPublicKey) -> bool
fn eq(&self, other: &NostrPublicKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for NostrPublicKey
impl StructuralPartialEq for NostrPublicKey
Auto Trait Implementations§
impl Freeze for NostrPublicKey
impl RefUnwindSafe for NostrPublicKey
impl Send for NostrPublicKey
impl Sync for NostrPublicKey
impl Unpin for NostrPublicKey
impl UnsafeUnpin for NostrPublicKey
impl UnwindSafe for NostrPublicKey
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
Checks if this value is equivalent to the given key. Read more
§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<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more