[][src]Struct tmkms::keyring::ed25519::PublicKey

pub struct PublicKey(pub [u8; 32]);

Ed25519 public keys

Methods

impl PublicKey[src]

pub fn new(bytes: [u8; 32]) -> PublicKey[src]

Create an Ed25519 public key from a 32-byte array

pub fn from_bytes<B>(bytes: B) -> Option<PublicKey> where
    B: AsRef<[u8]>, 
[src]

Create an Ed25519 public key from its serialized (compressed Edwards-y) form

pub fn as_bytes(&self) -> &[u8; 32][src]

Obtain public key as a byte array reference

pub fn into_bytes(self) -> [u8; 32][src]

Convert public key into owned byte array

Trait Implementations

impl AsRef<[u8]> for PublicKey[src]

impl Clone for PublicKey[src]

impl Copy for PublicKey[src]

impl Debug for PublicKey[src]

impl Decode for PublicKey[src]

fn decode<E>(encoded_key: &[u8], encoding: &E) -> Result<PublicKey, Error> where
    E: Encoding
[src]

Decode an Ed25519 public key from a byte slice with the given encoding (e.g. hex, Base64)

impl Encode for PublicKey[src]

fn encode<E>(&self, encoding: &E) -> Vec<u8> where
    E: Encoding
[src]

Encode an Ed25519 seed with the given encoding (e.g. hex, Base64)

impl Eq for PublicKey[src]

impl From<PublicKey> for PublicKey[src]

impl Hash for PublicKey[src]

impl Ord for PublicKey[src]

impl PartialEq<PublicKey> for PublicKey[src]

impl PartialOrd<PublicKey> for PublicKey[src]

impl PublicKey for PublicKey[src]

impl StructuralEq for PublicKey[src]

impl StructuralPartialEq for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToHex for T where
    T: AsRef<[u8]>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,