pub struct Secp256k1PublicKey(/* private fields */);
Implementations§
Source§impl Secp256k1PublicKey
impl Secp256k1PublicKey
pub fn to_address(&self) -> Address
Available on crate feature
hash
only.Source§impl Secp256k1PublicKey
impl Secp256k1PublicKey
pub const fn new(bytes: [u8; 33]) -> Self
pub fn generate<R>(rng: R) -> Self
Available on crate feature
rand
only.Sourcepub const fn into_inner(self) -> [u8; 33]
pub const fn into_inner(self) -> [u8; 33]
Return the underlying byte array of an Secp256k1PublicKey.
pub const fn inner(&self) -> &[u8; 33]
pub const fn as_bytes(&self) -> &[u8] ⓘ
pub fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, TryFromSliceError>
Source§impl Secp256k1PublicKey
impl Secp256k1PublicKey
pub fn scheme(&self) -> SignatureScheme
Trait Implementations§
Source§impl Arbitrary for Secp256k1PublicKey
impl Arbitrary for Secp256k1PublicKey
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<Secp256k1PublicKey>
type Strategy = BoxedStrategy<Secp256k1PublicKey>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl AsRef<[u8]> for Secp256k1PublicKey
impl AsRef<[u8]> for Secp256k1PublicKey
Source§impl Clone for Secp256k1PublicKey
impl Clone for Secp256k1PublicKey
Source§fn clone(&self) -> Secp256k1PublicKey
fn clone(&self) -> Secp256k1PublicKey
Returns a copy 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 Secp256k1PublicKey
impl Debug for Secp256k1PublicKey
Source§impl<'de> Deserialize<'de> for Secp256k1PublicKey
impl<'de> Deserialize<'de> for Secp256k1PublicKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Secp256k1PublicKey
impl Display for Secp256k1PublicKey
Source§impl From<Secp256k1PublicKey> for [u8; 33]
impl From<Secp256k1PublicKey> for [u8; 33]
Source§fn from(public_key: Secp256k1PublicKey) -> Self
fn from(public_key: Secp256k1PublicKey) -> Self
Converts to this type from the input type.
Source§impl FromStr for Secp256k1PublicKey
impl FromStr for Secp256k1PublicKey
Source§impl Hash for Secp256k1PublicKey
impl Hash for Secp256k1PublicKey
Source§impl Ord for Secp256k1PublicKey
impl Ord for Secp256k1PublicKey
Source§fn cmp(&self, other: &Secp256k1PublicKey) -> Ordering
fn cmp(&self, other: &Secp256k1PublicKey) -> 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 Secp256k1PublicKey
impl PartialEq for Secp256k1PublicKey
Source§impl PartialOrd for Secp256k1PublicKey
impl PartialOrd for Secp256k1PublicKey
Source§impl Serialize for Secp256k1PublicKey
impl Serialize for Secp256k1PublicKey
impl Copy for Secp256k1PublicKey
impl Eq for Secp256k1PublicKey
impl StructuralPartialEq for Secp256k1PublicKey
Auto Trait Implementations§
impl Freeze for Secp256k1PublicKey
impl RefUnwindSafe for Secp256k1PublicKey
impl Send for Secp256k1PublicKey
impl Sync for Secp256k1PublicKey
impl Unpin for Secp256k1PublicKey
impl UnwindSafe for Secp256k1PublicKey
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> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)