pub struct PublicKey(_);
Expand description
Public key on a secp256k1 curve.
Implementations
sourceimpl PublicKey
impl PublicKey
pub fn from_secret_key(seckey: &SecretKey) -> PublicKey
pub fn parse_slice(
p: &[u8],
format: Option<PublicKeyFormat>
) -> Result<PublicKey, Error>
pub fn parse(p: &[u8; 65]) -> Result<PublicKey, Error>
pub fn parse_compressed(p: &[u8; 33]) -> Result<PublicKey, Error>
pub fn serialize(&self) -> [u8; 65]
pub fn serialize_compressed(&self) -> [u8; 33]
pub fn tweak_add_assign(&mut self, tweak: &SecretKey) -> Result<(), Error>
pub fn tweak_mul_assign(&mut self, tweak: &SecretKey) -> Result<(), Error>
pub fn combine(keys: &[PublicKey]) -> Result<Self, Error>
Trait Implementations
impl Eq for PublicKey
impl StructuralEq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more