#[repr(C)]pub struct PublicKey(/* private fields */);
Expand description
Library-internal representation of a Secp256k1 public key
Implementations§
§impl PublicKey
impl PublicKey
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Converts the object to a mutable raw pointer for FFI interfacing
§impl PublicKey
impl PublicKey
pub unsafe fn new() -> PublicKey
pub unsafe fn new() -> PublicKey
Creates an “uninitialized” FFI public key which is zeroed out
§Safety
If you pass this to any FFI functions, except as an out-pointer, the result is likely to be an assertation failure and process termination.
pub unsafe fn from_array_unchecked(data: [u8; 64]) -> PublicKey
pub unsafe fn from_array_unchecked(data: [u8; 64]) -> PublicKey
Create a new public key usable for the FFI interface from raw bytes
§Safety
Does not check the validity of the underlying representation. If it is invalid the result may be assertation failures (and process aborts) from the underlying library. You should not use this method except with data that you obtained from the FFI interface of the same version of this library.
pub fn underlying_bytes(self) -> [u8; 64]
pub fn underlying_bytes(self) -> [u8; 64]
Returns the underlying FFI opaque representation of the public key
You should not use this unless you really know what you are doing. It is essentially only useful for extending the FFI interface itself.
Trait Implementations§
§impl Ord for PublicKey
impl Ord for PublicKey
§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
impl Copy for PublicKey
impl Eq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request