[][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)

Implementations

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: Clone> Clone 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> Decodable for ProprietaryKey<Subtype> where
    Subtype: Copy + From<u8> + Into<u8>, 
[src]

impl<Subtype> Encodable 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: Hash> Hash 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]

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

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

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

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

Auto Trait Implementations

impl<Subtype> RefUnwindSafe for ProprietaryKey<Subtype> where
    Subtype: RefUnwindSafe
[src]

impl<Subtype> Send for ProprietaryKey<Subtype> where
    Subtype: Send
[src]

impl<Subtype> Sync for ProprietaryKey<Subtype> where
    Subtype: Sync
[src]

impl<Subtype> Unpin for ProprietaryKey<Subtype> where
    Subtype: Unpin
[src]

impl<Subtype> UnwindSafe for ProprietaryKey<Subtype> where
    Subtype: UnwindSafe
[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.