[][src]Struct bitcoin::util::psbt::raw::ProprietaryKey

pub struct ProprietaryKey<Subtype = ProprietaryType> where
    Subtype: Copy + From<u8> + Into<u8>, 
{ pub prefix: Vec<u8>, pub subtype: Subtype, pub key: Vec<u8>, }

Proprietary keys (i.e. keys starting with 0xFC byte) with their internal structure according to BIP 174.

Fields

prefix: Vec<u8>

Proprietary type prefix used for grouping together keys under some application and avoid namespace collision

subtype: Subtype

Custom proprietary subtype

key: Vec<u8>

Additional key bytes (like serialized public key data etc)

Methods

impl<Subtype> ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

pub fn from_key(key: Key) -> Result<Self, Error>[src]

Constructs [ProprietaryKey] from [Key]; returns [Error::InvalidProprietaryKey] if key do not starts with 0xFC byte

pub fn to_key(&self) -> Key[src]

Constructs full [Key] corresponding to this proprietary key type

Trait Implementations

impl<Subtype> Encodable for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype> Decodable for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype: Ord> Ord for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<Subtype: PartialOrd> PartialOrd<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype: Clone> Clone for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<Subtype: PartialEq> PartialEq<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype: Eq> Eq for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype: Debug> Debug for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype: Hash> Hash for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<Subtype> Unpin for ProprietaryKey<Subtype> where
    Subtype: Unpin

impl<Subtype> Sync for ProprietaryKey<Subtype> where
    Subtype: Sync

impl<Subtype> Send for ProprietaryKey<Subtype> where
    Subtype: Send

impl<Subtype> UnwindSafe for ProprietaryKey<Subtype> where
    Subtype: UnwindSafe

impl<Subtype> RefUnwindSafe for ProprietaryKey<Subtype> where
    Subtype: RefUnwindSafe

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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