[][src]Enum casper_types::PublicKey

pub enum PublicKey {
    Ed25519([u8; 32]),
    Secp256k1(Secp256k1Bytes),
}

Simplified raw data type

Variants

Ed25519([u8; 32])

Ed25519 public key.

Secp256k1(Secp256k1Bytes)

Secp256k1 public key.

Implementations

impl PublicKey[src]

pub fn to_hex(&self) -> String[src]

Converts the public key to hex, where the first byte represents the algorithm tag.

pub fn from_hex<T: AsRef<[u8]>>(input: T) -> Result<PublicKey, FromStrError>[src]

Tries to decode the public key from its hex-representation. The hex format should be as produced by PublicKey::to_hex().

Trait Implementations

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

impl CLTyped for PublicKey[src]

impl Clone for PublicKey[src]

impl Copy for PublicKey[src]

impl DataSize for PublicKey where
    [u8; 32]: DataSize,
    Secp256k1Bytes: DataSize
[src]

impl Debug for PublicKey[src]

impl<'de> Deserialize<'de> for PublicKey[src]

impl Eq for PublicKey[src]

impl From<PublicKey> for AccountHash[src]

impl FromBytes for PublicKey[src]

impl Ord for PublicKey[src]

impl PartialEq<PublicKey> for PublicKey[src]

impl PartialOrd<PublicKey> for PublicKey[src]

impl Serialize for PublicKey[src]

impl StructuralEq for PublicKey[src]

impl StructuralPartialEq for PublicKey[src]

impl ToBytes for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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> 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.