Struct ProprietaryKey
pub struct ProprietaryKey<Subtype = 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§
§impl<Subtype> ProprietaryKey<Subtype>
impl<Subtype> ProprietaryKey<Subtype>
pub fn from_key(key: Key) -> Result<ProprietaryKey<Subtype>, Error>
👎Deprecated since 0.29.0: use try_from instead
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§
§impl<Subtype> Clone for ProprietaryKey<Subtype>
impl<Subtype> Clone for ProprietaryKey<Subtype>
§fn clone(&self) -> ProprietaryKey<Subtype>
fn clone(&self) -> ProprietaryKey<Subtype>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<Subtype> Debug for ProprietaryKey<Subtype>
impl<Subtype> Debug for ProprietaryKey<Subtype>
§impl<Subtype> Decodable for ProprietaryKey<Subtype>
impl<Subtype> Decodable for ProprietaryKey<Subtype>
§fn consensus_decode<R>(r: &mut R) -> Result<ProprietaryKey<Subtype>, Error>
fn consensus_decode<R>(r: &mut R) -> Result<ProprietaryKey<Subtype>, Error>
Decode an object with a well-defined format. Read more
§impl<Subtype> Encodable for ProprietaryKey<Subtype>
impl<Subtype> Encodable for ProprietaryKey<Subtype>
§impl<Subtype> Hash for ProprietaryKey<Subtype>
impl<Subtype> Hash for ProprietaryKey<Subtype>
§impl<Subtype> Ord for ProprietaryKey<Subtype>
impl<Subtype> Ord for ProprietaryKey<Subtype>
§fn cmp(&self, other: &ProprietaryKey<Subtype>) -> Ordering
fn cmp(&self, other: &ProprietaryKey<Subtype>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl<Subtype> PartialEq for ProprietaryKey<Subtype>
impl<Subtype> PartialEq for ProprietaryKey<Subtype>
§impl<Subtype> PartialOrd for ProprietaryKey<Subtype>
impl<Subtype> PartialOrd for ProprietaryKey<Subtype>
§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<Subtype> Eq for ProprietaryKey<Subtype>
impl<Subtype> StructuralPartialEq for ProprietaryKey<Subtype>
Auto Trait Implementations§
impl<Subtype> Freeze for ProprietaryKey<Subtype>where
Subtype: Freeze,
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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
§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
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request