[][src]Struct monacoin::util::key::PublicKey

pub struct PublicKey {
    pub compressed: bool,
    pub key: PublicKey,
}

A Monacoin ECDSA public key

Fields

compressed: bool

Whether this public key should be serialized as compressed

key: PublicKey

The actual ECDSA key

Methods

impl PublicKey[src]

pub fn write_into<W: Write>(&self, writer: W)[src]

Write the public key into a writer

pub fn to_bytes(&self) -> Vec<u8>[src]

Serialize the public key to bytes

pub fn from_slice(data: &[u8]) -> Result<PublicKey, Error>[src]

Deserialize a public key from a slice

pub fn from_private_key<C: Signing>(
    secp: &Secp256k1<C>,
    sk: &PrivateKey
) -> PublicKey
[src]

Computes the public key as supposed to be used with this secret

Trait Implementations

impl Clone for PublicKey[src]

impl Copy for PublicKey[src]

impl Debug for PublicKey[src]

impl Deserialize for PublicKey[src]

impl Display for PublicKey[src]

impl Eq for PublicKey[src]

impl FromStr for PublicKey[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for PublicKey[src]

impl Ord for PublicKey[src]

impl PartialEq<PublicKey> for PublicKey[src]

impl PartialOrd<PublicKey> for PublicKey[src]

impl Serialize for PublicKey[src]

impl StructuralEq for PublicKey[src]

impl StructuralPartialEq for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,