Struct Key
pub struct Key {
pub type_value: u8,
pub key: Vec<u8>,
}
Expand description
A PSBT key in its raw byte form.
Fields§
§type_value: u8
The type of this PSBT key.
key: Vec<u8>
The key itself in raw byte form.
<key> := <keylen> <keytype> <keydata>
Trait Implementations§
§impl<'de> Deserialize<'de> for Key
impl<'de> Deserialize<'de> for Key
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Key, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Key, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Ord for Key
impl Ord for Key
§impl PartialOrd for Key
impl PartialOrd for Key
§impl Serialize for Key
impl Serialize for Key
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl<Subtype> TryFrom<Key> for ProprietaryKey<Subtype>
impl<Subtype> TryFrom<Key> for ProprietaryKey<Subtype>
§fn try_from(
key: Key,
) -> Result<ProprietaryKey<Subtype>, <ProprietaryKey<Subtype> as TryFrom<Key>>::Error>
fn try_from( key: Key, ) -> Result<ProprietaryKey<Subtype>, <ProprietaryKey<Subtype> as TryFrom<Key>>::Error>
Constructs a ProprietaryKey
from a Key
.
§Errors
Returns Error::InvalidProprietaryKey
if key
does not start with 0xFC
byte.
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more