[−][src]Struct bitcoin_rpc_client::PrivateKey
A Bitcoin ECDSA private key
Fields
compressed: bool
Whether this private key should be serialized as compressed
network: Network
The network on which this key should be used
key: SecretKey
The actual ECDSA key
Methods
impl PrivateKey
[src]
pub fn public_key<C>(&self, secp: &Secp256k1<C>) -> PublicKey where
C: Signing,
[src]
C: Signing,
Creates a public key from this private key
pub fn to_bytes(&self) -> Vec<u8>
[src]
Serialize the private key to bytes
pub fn fmt_wif(&self, fmt: &mut dyn Write) -> Result<(), Error>
[src]
Format the private key to WIF format.
pub fn to_wif(&self) -> String
[src]
Get WIF encoding of this private key.
pub fn from_wif(wif: &str) -> Result<PrivateKey, Error>
[src]
Parse WIF encoded private key.
Trait Implementations
impl Eq for PrivateKey
[src]
impl<'de> Deserialize<'de> for PrivateKey
[src]
fn deserialize<D>(d: D) -> Result<PrivateKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Clone for PrivateKey
[src]
fn clone(&self) -> PrivateKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<PrivateKey> for PrivateKey
[src]
fn eq(&self, other: &PrivateKey) -> bool
[src]
fn ne(&self, other: &PrivateKey) -> bool
[src]
impl Index<RangeFull> for PrivateKey
[src]
impl FromStr for PrivateKey
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<PrivateKey, Error>
[src]
impl Debug for PrivateKey
[src]
impl Display for PrivateKey
[src]
impl Copy for PrivateKey
[src]
impl Serialize for PrivateKey
[src]
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl From<PrivateKey> for PrivateKey
[src]
fn from(p: PrivateKey) -> Self
[src]
impl From<PrivateKey> for PrivateKey
[src]
fn from(p: PrivateKey) -> Self
[src]
Auto Trait Implementations
impl Send for PrivateKey
impl Sync for PrivateKey
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Configure for T where
T: ?Sized,
[src]
T: ?Sized,
fn readable(self) -> Readable<Self>
[src]
Marks self
as using is_human_readable == true
fn compact(self) -> Compact<Self>
[src]
Marks self
as using is_human_readable == false
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<'a, T> TryFrom<&'a str> for T where
T: FromStr,
T: FromStr,
type Err = <T as FromStr>::Err
fn try_from(string: &'a str) -> Result<T, <T as TryFrom<&'a str>>::Err>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,