pub struct EthereumPublicKey(/* private fields */);Expand description
Represents an Ethereum public key
Implementations§
Source§impl EthereumPublicKey
impl EthereumPublicKey
Sourcepub fn from_secp256k1_public_key(public_key: PublicKey) -> Self
pub fn from_secp256k1_public_key(public_key: PublicKey) -> Self
Returns a public key given a secp256k1 public key.
pub fn from_slice(sl: &[u8]) -> Result<Self, PublicKeyError>
Sourcepub fn to_secp256k1_public_key(&self) -> PublicKey
pub fn to_secp256k1_public_key(&self) -> PublicKey
Returns the secp256k1 public key of the public key
Trait Implementations§
Source§impl Clone for EthereumPublicKey
impl Clone for EthereumPublicKey
Source§fn clone(&self) -> EthereumPublicKey
fn clone(&self) -> EthereumPublicKey
Returns a duplicate 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 EthereumPublicKey
impl Debug for EthereumPublicKey
Source§impl Display for EthereumPublicKey
impl Display for EthereumPublicKey
Source§impl FromStr for EthereumPublicKey
impl FromStr for EthereumPublicKey
Source§impl PartialEq for EthereumPublicKey
impl PartialEq for EthereumPublicKey
Source§impl PublicKey for EthereumPublicKey
impl PublicKey for EthereumPublicKey
Source§fn from_secret_key(secret_key: &Self::SecretKey) -> Self
fn from_secret_key(secret_key: &Self::SecretKey) -> Self
Returns the public key corresponding to the given private key.
Source§fn to_address(
&self,
_format: &Self::Format,
) -> Result<Self::Address, AddressError>
fn to_address( &self, _format: &Self::Format, ) -> Result<Self::Address, AddressError>
Returns the address of this public key.
type SecretKey = SecretKey
type Address = EthereumAddress
type Format = EthereumFormat
impl Eq for EthereumPublicKey
impl StructuralPartialEq for EthereumPublicKey
Auto Trait Implementations§
impl Freeze for EthereumPublicKey
impl RefUnwindSafe for EthereumPublicKey
impl Send for EthereumPublicKey
impl Sync for EthereumPublicKey
impl Unpin for EthereumPublicKey
impl UnwindSafe for EthereumPublicKey
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