[−][src]Enum casper_types::crypto::PublicKey
A public asymmetric key.
Variants
System public key.
Ed25519(PublicKey)Ed25519 public key.
Secp256k1(PublicKey)secp256k1 public key.
Implementations
impl PublicKey[src]
pub const SYSTEM_LENGTH: usize[src]
The length in bytes of a system public key.
pub const ED25519_LENGTH: usize[src]
The length in bytes of an Ed25519 public key.
pub const SECP256K1_LENGTH: usize[src]
The length in bytes of a secp256k1 public key.
pub fn ed25519(bytes: [u8; 32]) -> Result<Self, Error>[src]
Constructs a new Ed25519 variant from a byte array.
pub fn secp256k1(bytes: [u8; 33]) -> Result<Self, Error>[src]
Constructs a new secp256k1 variant from a byte array.
pub fn to_account_hash(&self) -> AccountHash[src]
Creates an AccountHash from a given PublicKey instance.
Trait Implementations
impl AsRef<[u8]> for PublicKey[src]
impl AsymmetricType for PublicKey[src]
pub fn system() -> Self[src]
pub fn ed25519_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Error>[src]
pub fn secp256k1_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Error>[src]
pub fn to_hex(&self) -> String[src]
pub fn from_hex<A: AsRef<[u8]>>(input: A) -> Result<Self, Error>[src]
impl CLTyped for PublicKey[src]
impl Clone for PublicKey[src]
impl Copy for PublicKey[src]
impl DataSize for PublicKey[src]
pub const IS_DYNAMIC: bool[src]
pub const STATIC_HEAP_SIZE: usize[src]
pub fn estimate_heap_size(&self) -> usize[src]
impl Debug for PublicKey[src]
impl<'de> Deserialize<'de> for PublicKey[src]
pub fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<Self, D::Error>[src]
deserializer: D
) -> Result<Self, D::Error>
impl Display for PublicKey[src]
impl Eq for PublicKey[src]
impl From<&'_ PublicKey> for AccountHash[src]
impl From<&'_ SecretKey> for PublicKey[src]
impl From<SecretKey> for PublicKey[src]
impl FromBytes for PublicKey[src]
pub fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>[src]
pub fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>[src]
impl Hash for PublicKey[src]
pub fn hash<H: Hasher>(&self, state: &mut H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for PublicKey[src]
pub fn cmp(&self, other: &Self) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<PublicKey> for PublicKey[src]
impl PartialOrd<PublicKey> for PublicKey[src]
pub fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl Serialize for PublicKey[src]
impl StructuralEq for PublicKey[src]
impl StructuralPartialEq for PublicKey[src]
impl Tagged<u8> for PublicKey[src]
impl ToBytes for PublicKey[src]
Auto Trait Implementations
impl RefUnwindSafe for PublicKey[src]
impl Send for PublicKey[src]
impl Sync for PublicKey[src]
impl Unpin for PublicKey[src]
impl UnwindSafe for PublicKey[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>, [src]
T: AsRef<[u8]>,
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>, [src]
U: FromIterator<char>,
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>, [src]
U: FromIterator<char>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,