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.
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 Hash for EthereumPublicKey
impl Hash for EthereumPublicKey
Source§impl Ord for EthereumPublicKey
impl Ord for EthereumPublicKey
Source§fn cmp(&self, other: &EthereumPublicKey) -> Ordering
fn cmp(&self, other: &EthereumPublicKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EthereumPublicKey
impl PartialEq for EthereumPublicKey
Source§impl PartialOrd for EthereumPublicKey
impl PartialOrd for EthereumPublicKey
Source§impl PublicKey for EthereumPublicKey
impl PublicKey for EthereumPublicKey
Source§fn from_private_key(private_key: &Self::PrivateKey) -> Self
fn from_private_key(private_key: &Self::PrivateKey) -> Self
Returns the address corresponding to the given public 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 the corresponding private key.
type Address = EthereumAddress
type Format = EthereumFormat
type PrivateKey = EthereumPrivateKey
impl Copy for EthereumPublicKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more