pub struct NamespacePublicKey(/* private fields */);Expand description
The corresponding VerifyingKey for a NamespaceSecret.
It is used as an identifier, and can be used to verify Signatures.
Implementations§
Source§impl NamespacePublicKey
 
impl NamespacePublicKey
Sourcepub fn verify(
    &self,
    msg: &[u8],
    signature: &Signature,
) -> Result<(), SignatureError>
 
pub fn verify( &self, msg: &[u8], signature: &Signature, ) -> Result<(), SignatureError>
Verify that a signature matches the msg bytes and was created with the NamespaceSecret
that corresponds to this NamespaceId.
Sourcepub fn as_bytes(&self) -> &[u8; 32]
 
pub fn as_bytes(&self) -> &[u8; 32]
Get the byte representation of this NamespaceId.
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>
 
pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>
Create from a slice of bytes.
Will return an error if the input bytes do not represent a valid ed25519_dalek
curve point. Will never fail for a byte array returned from Self::as_bytes.
See VerifyingKey::from_bytes for details.
Trait Implementations§
Source§impl Clone for NamespacePublicKey
 
impl Clone for NamespacePublicKey
Source§fn clone(&self) -> NamespacePublicKey
 
fn clone(&self) -> NamespacePublicKey
Returns a copy 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 NamespacePublicKey
 
impl Debug for NamespacePublicKey
Source§impl Default for NamespacePublicKey
 
impl Default for NamespacePublicKey
Source§fn default() -> NamespacePublicKey
 
fn default() -> NamespacePublicKey
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NamespacePublicKey
 
impl<'de> Deserialize<'de> for NamespacePublicKey
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 NamespacePublicKey
 
impl Display for NamespacePublicKey
Source§impl From<&NamespacePublicKey> for NamespaceId
 
impl From<&NamespacePublicKey> for NamespaceId
Source§fn from(value: &NamespacePublicKey) -> Self
 
fn from(value: &NamespacePublicKey) -> Self
Converts to this type from the input type.
Source§impl From<&NamespaceSecret> for NamespacePublicKey
 
impl From<&NamespaceSecret> for NamespacePublicKey
Source§fn from(value: &NamespaceSecret) -> Self
 
fn from(value: &NamespaceSecret) -> Self
Converts to this type from the input type.
Source§impl From<NamespacePublicKey> for NamespaceId
 
impl From<NamespacePublicKey> for NamespaceId
Source§fn from(value: NamespacePublicKey) -> Self
 
fn from(value: NamespacePublicKey) -> Self
Converts to this type from the input type.
Source§impl From<NamespaceSecret> for NamespacePublicKey
 
impl From<NamespaceSecret> for NamespacePublicKey
Source§fn from(value: NamespaceSecret) -> Self
 
fn from(value: NamespaceSecret) -> Self
Converts to this type from the input type.
Source§impl From<VerifyingKey> for NamespacePublicKey
 
impl From<VerifyingKey> for NamespacePublicKey
Source§fn from(value: VerifyingKey) -> Self
 
fn from(value: VerifyingKey) -> Self
Converts to this type from the input type.
Source§impl FromStr for NamespacePublicKey
 
impl FromStr for NamespacePublicKey
Source§impl Hash for NamespacePublicKey
 
impl Hash for NamespacePublicKey
Source§impl Ord for NamespacePublicKey
 
impl Ord for NamespacePublicKey
Source§impl PartialEq for NamespacePublicKey
 
impl PartialEq for NamespacePublicKey
Source§impl PartialOrd for NamespacePublicKey
 
impl PartialOrd for NamespacePublicKey
Source§impl Serialize for NamespacePublicKey
 
impl Serialize for NamespacePublicKey
Source§impl TryFrom<NamespaceId> for NamespacePublicKey
 
impl TryFrom<NamespaceId> for NamespacePublicKey
impl Copy for NamespacePublicKey
impl Eq for NamespacePublicKey
impl StructuralPartialEq for NamespacePublicKey
Auto Trait Implementations§
impl Freeze for NamespacePublicKey
impl RefUnwindSafe for NamespacePublicKey
impl Send for NamespacePublicKey
impl Sync for NamespacePublicKey
impl Unpin for NamespacePublicKey
impl UnwindSafe for NamespacePublicKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
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<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.