Struct psbt::ProprietaryKey
source · [−]pub struct ProprietaryKey<Subtype = u8> where
Subtype: Copy + From<u8> + Into<u8>, {
pub prefix: Vec<u8, Global>,
pub subtype: Subtype,
pub key: Vec<u8, Global>,
}
Expand description
Proprietary keys (i.e. keys starting with 0xFC byte) with their internal structure according to BIP 174.
Fields
prefix: Vec<u8, Global>
Proprietary type prefix used for grouping together keys under some application and avoid namespace collision
subtype: Subtype
Custom proprietary subtype
key: Vec<u8, Global>
Additional key bytes (like serialized public key data etc)
Implementations
sourceimpl<Subtype> ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype> ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
sourcepub fn from_key(key: Key) -> Result<ProprietaryKey<Subtype>, Error>
pub fn from_key(key: Key) -> Result<ProprietaryKey<Subtype>, Error>
Constructs ProprietaryKey from Key; returns
Error::InvalidProprietaryKey if key
do not starts with 0xFC byte
Trait Implementations
sourceimpl<Subtype> Clone for ProprietaryKey<Subtype> where
Subtype: Clone + Copy + From<u8> + Into<u8>,
impl<Subtype> Clone for ProprietaryKey<Subtype> where
Subtype: Clone + Copy + From<u8> + Into<u8>,
sourcefn clone(&self) -> ProprietaryKey<Subtype>
fn clone(&self) -> ProprietaryKey<Subtype>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Subtype> Debug for ProprietaryKey<Subtype> where
Subtype: Debug + Copy + From<u8> + Into<u8>,
impl<Subtype> Debug for ProprietaryKey<Subtype> where
Subtype: Debug + Copy + From<u8> + Into<u8>,
sourceimpl<Subtype> Decodable for ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype> Decodable for ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
sourcefn consensus_decode<D>(d: D) -> Result<ProprietaryKey<Subtype>, Error> where
D: Read,
fn consensus_decode<D>(d: D) -> Result<ProprietaryKey<Subtype>, Error> where
D: Read,
Decode an object with a well-defined format
sourceimpl<Subtype> Encodable for ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype> Encodable for ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
sourceimpl<Subtype> Hash for ProprietaryKey<Subtype> where
Subtype: Hash + Copy + From<u8> + Into<u8>,
impl<Subtype> Hash for ProprietaryKey<Subtype> where
Subtype: Hash + Copy + From<u8> + Into<u8>,
sourceimpl<Subtype> Ord for ProprietaryKey<Subtype> where
Subtype: Ord + Copy + From<u8> + Into<u8>,
impl<Subtype> Ord for ProprietaryKey<Subtype> where
Subtype: Ord + Copy + From<u8> + Into<u8>,
sourceimpl<Subtype> PartialEq<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype> where
Subtype: PartialEq<Subtype> + Copy + From<u8> + Into<u8>,
impl<Subtype> PartialEq<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype> where
Subtype: PartialEq<Subtype> + Copy + From<u8> + Into<u8>,
sourcefn eq(&self, other: &ProprietaryKey<Subtype>) -> bool
fn eq(&self, other: &ProprietaryKey<Subtype>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProprietaryKey<Subtype>) -> bool
fn ne(&self, other: &ProprietaryKey<Subtype>) -> bool
This method tests for !=
.
sourceimpl<Subtype> PartialOrd<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype> where
Subtype: PartialOrd<Subtype> + Copy + From<u8> + Into<u8>,
impl<Subtype> PartialOrd<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype> where
Subtype: PartialOrd<Subtype> + Copy + From<u8> + Into<u8>,
sourcefn partial_cmp(&self, other: &ProprietaryKey<Subtype>) -> Option<Ordering>
fn partial_cmp(&self, other: &ProprietaryKey<Subtype>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl StrictDecode for ProprietaryKey<u8>
impl StrictDecode for ProprietaryKey<u8>
fn strict_decode<D>(d: D) -> Result<ProprietaryKey<u8>, Error> where
D: Read,
fn strict_decode<D>(d: D) -> Result<ProprietaryKey<u8>, Error> where
D: Read,
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
impl StrictEncode for ProprietaryKey<u8>
impl StrictEncode for ProprietaryKey<u8>
fn strict_encode<E>(&self, e: E) -> Result<usize, Error> where
E: Write,
fn strict_encode<E>(&self, e: E) -> Result<usize, Error> where
E: Write,
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
impl<Subtype> Eq for ProprietaryKey<Subtype> where
Subtype: Eq + Copy + From<u8> + Into<u8>,
impl<Subtype> StructuralEq for ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype> StructuralPartialEq for ProprietaryKey<Subtype> where
Subtype: Copy + From<u8> + Into<u8>,
Auto Trait Implementations
impl<Subtype> RefUnwindSafe for ProprietaryKey<Subtype> where
Subtype: RefUnwindSafe,
impl<Subtype> Send for ProprietaryKey<Subtype> where
Subtype: Send,
impl<Subtype> Sync for ProprietaryKey<Subtype> where
Subtype: Sync,
impl<Subtype> Unpin for ProprietaryKey<Subtype> where
Subtype: Unpin,
impl<Subtype> UnwindSafe for ProprietaryKey<Subtype> where
Subtype: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more