Struct secp256k1_zkp_sys::PublicKey
source · [−]#[repr(C)]pub struct PublicKey(_);
Expand description
Library-internal representation of a Secp256k1 public key
Implementations
sourceimpl PublicKey
impl PublicKey
sourcepub unsafe fn new() -> PublicKey
pub unsafe fn new() -> PublicKey
Creates an “uninitialized” FFI public key which is zeroed out
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.
sourcepub 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
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.
sourcepub 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
sourceimpl Ord for PublicKey
impl Ord for PublicKey
sourceimpl PartialOrd<PublicKey> for PublicKey
impl PartialOrd<PublicKey> for PublicKey
sourcefn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for PublicKey
impl Eq 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 · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more