pub struct ProprietaryKey<Subtype = ProprietaryType>where
Subtype: Copy + From<u8> + Into<u8>,{
pub prefix: Vec<u8>,
pub subtype: Subtype,
pub key: Vec<u8>,
}
Expand description
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
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<Self, Error>
👎Deprecated since 0.29.0: use try_from instead
pub fn from_key(key: Key) -> Result<Self, Error>
Constructs ProprietaryKey from Key; returns
Error::InvalidProprietaryKey if key
do not starts with 0xFC byte
Trait Implementations
sourceimpl<Subtype: Clone> Clone for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: Clone> Clone for ProprietaryKey<Subtype>where
Subtype: 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 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<Subtype: Debug> Debug for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: Debug> Debug for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
sourceimpl<'de, Subtype> Deserialize<'de> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
Subtype: Deserialize<'de>,
impl<'de, Subtype> Deserialize<'de> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
Subtype: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<Subtype: Hash> Hash for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: Hash> Hash for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
sourceimpl<Subtype: Ord> Ord for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: Ord> Ord for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
sourcefn cmp(&self, other: &ProprietaryKey<Subtype>) -> Ordering
fn cmp(&self, other: &ProprietaryKey<Subtype>) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<Subtype: PartialEq> PartialEq<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: PartialEq> PartialEq<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
sourcefn eq(&self, other: &ProprietaryKey<Subtype>) -> bool
fn eq(&self, other: &ProprietaryKey<Subtype>) -> bool
sourceimpl<Subtype: PartialOrd> PartialOrd<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: PartialOrd> PartialOrd<ProprietaryKey<Subtype>> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
sourcefn partial_cmp(&self, other: &ProprietaryKey<Subtype>) -> Option<Ordering>
fn partial_cmp(&self, other: &ProprietaryKey<Subtype>) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl<Subtype> Serialize for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
Subtype: Serialize,
impl<Subtype> Serialize for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
Subtype: Serialize,
sourceimpl<Subtype> TryFrom<Key> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype> TryFrom<Key> for ProprietaryKey<Subtype>where
Subtype: Copy + From<u8> + Into<u8>,
impl<Subtype: Eq> Eq for ProprietaryKey<Subtype>where
Subtype: 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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