#[repr(transparent)]pub struct Secp256k1CompressedPublicKey(pub [u8; 33]);Expand description
Compressed Secp256k1 public key with leading SEC-1 tag byte.
Tuple Fields§
§0: [u8; 33]Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for Secp256k1CompressedPublicKey
impl<'arbitrary> Arbitrary<'arbitrary> for Secp256k1CompressedPublicKey
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§impl AsRef<[u8]> for Secp256k1CompressedPublicKey
impl AsRef<[u8]> for Secp256k1CompressedPublicKey
Source§impl BorshDeserialize for Secp256k1CompressedPublicKey
impl BorshDeserialize for Secp256k1CompressedPublicKey
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSchema for Secp256k1CompressedPublicKey
impl BorshSchema for Secp256k1CompressedPublicKey
Source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
Source§fn add_definitions_recursively(
definitions: &mut BTreeMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut BTreeMap<Declaration, Definition>, )
Recursively, using DFS, add type definitions required for this type.
Type definition partially explains how to serialize/deserialize a type.
Source§impl BorshSerialize for Secp256k1CompressedPublicKey
impl BorshSerialize for Secp256k1CompressedPublicKey
Source§impl Clone for Secp256k1CompressedPublicKey
impl Clone for Secp256k1CompressedPublicKey
Source§fn clone(&self) -> Secp256k1CompressedPublicKey
fn clone(&self) -> Secp256k1CompressedPublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Secp256k1CompressedPublicKey
impl Debug for Secp256k1CompressedPublicKey
Source§impl<'de> Deserialize<'de> for Secp256k1CompressedPublicKey
impl<'de> Deserialize<'de> for Secp256k1CompressedPublicKey
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<'__derive_more_into> From<&'__derive_more_into Secp256k1CompressedPublicKey> for &'__derive_more_into [u8; 33]
impl<'__derive_more_into> From<&'__derive_more_into Secp256k1CompressedPublicKey> for &'__derive_more_into [u8; 33]
Source§fn from(value: &'__derive_more_into Secp256k1CompressedPublicKey) -> Self
fn from(value: &'__derive_more_into Secp256k1CompressedPublicKey) -> Self
Converts to this type from the input type.
Source§impl From<&VerifyingKey<Secp256k1>> for Secp256k1CompressedPublicKey
impl From<&VerifyingKey<Secp256k1>> for Secp256k1CompressedPublicKey
Source§impl From<Secp256k1CompressedPublicKey> for [u8; 33]
impl From<Secp256k1CompressedPublicKey> for [u8; 33]
Source§fn from(value: Secp256k1CompressedPublicKey) -> Self
fn from(value: Secp256k1CompressedPublicKey) -> Self
Converts to this type from the input type.
Source§impl From<VerifyingKey<Secp256k1>> for Secp256k1CompressedPublicKey
impl From<VerifyingKey<Secp256k1>> for Secp256k1CompressedPublicKey
Source§impl Hash for Secp256k1CompressedPublicKey
impl Hash for Secp256k1CompressedPublicKey
Source§impl JsonSchema for Secp256k1CompressedPublicKey
impl JsonSchema for Secp256k1CompressedPublicKey
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Secp256k1CompressedPublicKey
impl Ord for Secp256k1CompressedPublicKey
Source§fn cmp(&self, other: &Secp256k1CompressedPublicKey) -> Ordering
fn cmp(&self, other: &Secp256k1CompressedPublicKey) -> Ordering
1.21.0 (const: unstable) · 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 Secp256k1CompressedPublicKey
impl PartialEq for Secp256k1CompressedPublicKey
Source§fn eq(&self, other: &Secp256k1CompressedPublicKey) -> bool
fn eq(&self, other: &Secp256k1CompressedPublicKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Secp256k1CompressedPublicKey
impl PartialOrd for Secp256k1CompressedPublicKey
Source§impl Serialize for Secp256k1CompressedPublicKeywhere
Self: Display,
impl Serialize for Secp256k1CompressedPublicKeywhere
Self: Display,
Source§impl TryFrom<&Secp256k1CompressedPublicKey> for VerifyingKey
impl TryFrom<&Secp256k1CompressedPublicKey> for VerifyingKey
Source§impl TryFrom<Secp256k1CompressedPublicKey> for VerifyingKey
impl TryFrom<Secp256k1CompressedPublicKey> for VerifyingKey
impl Copy for Secp256k1CompressedPublicKey
impl Eq for Secp256k1CompressedPublicKey
impl StructuralPartialEq for Secp256k1CompressedPublicKey
Auto Trait Implementations§
impl Freeze for Secp256k1CompressedPublicKey
impl RefUnwindSafe for Secp256k1CompressedPublicKey
impl Send for Secp256k1CompressedPublicKey
impl Sync for Secp256k1CompressedPublicKey
impl Unpin for Secp256k1CompressedPublicKey
impl UnsafeUnpin for Secp256k1CompressedPublicKey
impl UnwindSafe for Secp256k1CompressedPublicKey
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.Source§impl<S> SignerExt for S
impl<S> SignerExt for S
Source§fn public_key<C: Curve>(&self) -> C::PublicKeywhere
Self: Signer<C>,
fn public_key<C: Curve>(&self) -> C::PublicKeywhere
Self: Signer<C>,
Get the public key of the signer on a curve
C. Read moreSource§fn sign<C: Curve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<C::Signature, Self::Error>> + Sendwhere
Self: Signer<C>,
fn sign<C: Curve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<C::Signature, Self::Error>> + Sendwhere
Self: Signer<C>,
Sign a given message and return a signature. Read more
Source§fn sign_recoverable<C: RecoverableCurve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Sendwhere
Self: RecoverableSigner<C>,
fn sign_recoverable<C: RecoverableCurve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Sendwhere
Self: RecoverableSigner<C>,
Sign a given message and return a signature along with recovery id. Read more
Source§fn cache_public_key<C: Curve>(self) -> CachePublicKey<C, Self>
fn cache_public_key<C: Curve>(self) -> CachePublicKey<C, Self>
Calculate
.public_key() and cache its value for
further invocations. Read moreSource§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)