Struct XKeyIdentifier
pub struct XKeyIdentifier(/* private fields */);
Expand description
Extended key identifier as defined in BIP-32.
Implementations§
§impl XKeyIdentifier
impl XKeyIdentifier
pub fn from_raw_hash(inner: Hash) -> XKeyIdentifier
pub fn from_raw_hash(inner: Hash) -> XKeyIdentifier
Creates this wrapper type from the inner hash type.
pub fn to_raw_hash(self) -> Hash
pub fn to_raw_hash(self) -> Hash
Returns the inner hash (sha256, sh256d etc.).
pub fn as_raw_hash(&self) -> &Hash
pub fn as_raw_hash(&self) -> &Hash
Returns a reference to the inner hash (sha256, sh256d etc.).
Trait Implementations§
§impl AsRef<[u8]> for XKeyIdentifier
impl AsRef<[u8]> for XKeyIdentifier
§impl AsRef<[u8; 20]> for XKeyIdentifier
impl AsRef<[u8; 20]> for XKeyIdentifier
§impl Borrow<[u8]> for XKeyIdentifier
impl Borrow<[u8]> for XKeyIdentifier
§impl Clone for XKeyIdentifier
impl Clone for XKeyIdentifier
§fn clone(&self) -> XKeyIdentifier
fn clone(&self) -> XKeyIdentifier
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 Debug for XKeyIdentifier
impl Debug for XKeyIdentifier
§impl<'de> Deserialize<'de> for XKeyIdentifier
impl<'de> Deserialize<'de> for XKeyIdentifier
§fn deserialize<D>(
d: D,
) -> Result<XKeyIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
d: D,
) -> Result<XKeyIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for XKeyIdentifier
impl Display for XKeyIdentifier
§impl From<&Xpub> for XKeyIdentifier
impl From<&Xpub> for XKeyIdentifier
§fn from(key: &Xpub) -> XKeyIdentifier
fn from(key: &Xpub) -> XKeyIdentifier
Converts to this type from the input type.
§impl From<Hash> for XKeyIdentifier
impl From<Hash> for XKeyIdentifier
§fn from(inner: Hash) -> XKeyIdentifier
fn from(inner: Hash) -> XKeyIdentifier
Converts to this type from the input type.
§impl From<XKeyIdentifier> for Hash
impl From<XKeyIdentifier> for Hash
§fn from(hashtype: XKeyIdentifier) -> Hash
fn from(hashtype: XKeyIdentifier) -> Hash
Converts to this type from the input type.
§impl From<Xpub> for XKeyIdentifier
impl From<Xpub> for XKeyIdentifier
§fn from(key: Xpub) -> XKeyIdentifier
fn from(key: Xpub) -> XKeyIdentifier
Converts to this type from the input type.
§impl FromStr for XKeyIdentifier
impl FromStr for XKeyIdentifier
§type Err = HexToArrayError
type Err = HexToArrayError
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<XKeyIdentifier, <XKeyIdentifier as FromStr>::Err>
fn from_str(s: &str) -> Result<XKeyIdentifier, <XKeyIdentifier as FromStr>::Err>
Parses a string
s
to return a value of this type. Read more§impl Hash for XKeyIdentifier
impl Hash for XKeyIdentifier
§impl Hash for XKeyIdentifier
impl Hash for XKeyIdentifier
§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Flag indicating whether user-visible serializations of this hash
should be backward. For some reason Satoshi decided this should be
true for
Sha256dHash
, so here we are.§type Engine = <Hash as Hash>::Engine
type Engine = <Hash as Hash>::Engine
A hashing engine which bytes can be serialized into. It is expected
to implement the
io::Write
trait, and to never return errors under
any conditions.§fn engine() -> <XKeyIdentifier as Hash>::Engine
fn engine() -> <XKeyIdentifier as Hash>::Engine
Constructs a new engine.
§fn from_engine(e: <XKeyIdentifier as Hash>::Engine) -> XKeyIdentifier
fn from_engine(e: <XKeyIdentifier as Hash>::Engine) -> XKeyIdentifier
Produces a hash from the current state of a given engine.
§fn from_slice(sl: &[u8]) -> Result<XKeyIdentifier, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<XKeyIdentifier, FromSliceError>
Copies a byte slice into a hash object.
§fn from_byte_array(bytes: <XKeyIdentifier as Hash>::Bytes) -> XKeyIdentifier
fn from_byte_array(bytes: <XKeyIdentifier as Hash>::Bytes) -> XKeyIdentifier
Constructs a hash from the underlying byte array.
§fn to_byte_array(self) -> <XKeyIdentifier as Hash>::Bytes
fn to_byte_array(self) -> <XKeyIdentifier as Hash>::Bytes
Returns the underlying byte array.
§fn as_byte_array(&self) -> &<XKeyIdentifier as Hash>::Bytes
fn as_byte_array(&self) -> &<XKeyIdentifier as Hash>::Bytes
Returns a reference to the underlying byte array.
§fn all_zeros() -> XKeyIdentifier
fn all_zeros() -> XKeyIdentifier
Returns an all zero hash. Read more
§fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
Hashes all the byte slices retrieved from the iterator together.
§impl<I> Index<I> for XKeyIdentifierwhere
I: SliceIndex<[u8]>,
impl<I> Index<I> for XKeyIdentifierwhere
I: SliceIndex<[u8]>,
§impl LowerHex for XKeyIdentifier
impl LowerHex for XKeyIdentifier
§impl Ord for XKeyIdentifier
impl Ord for XKeyIdentifier
§impl PartialEq for XKeyIdentifier
impl PartialEq for XKeyIdentifier
§impl PartialOrd for XKeyIdentifier
impl PartialOrd for XKeyIdentifier
§impl SerdeHash for XKeyIdentifier
impl SerdeHash for XKeyIdentifier
§fn from_slice_delegated(sl: &[u8]) -> Result<XKeyIdentifier, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<XKeyIdentifier, FromSliceError>
Helper function to turn a deserialized slice into the correct hash type.
§fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Do serde serialization.
§fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Do serde deserialization.
§impl Serialize for XKeyIdentifier
impl Serialize for XKeyIdentifier
§fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl UpperHex for XKeyIdentifier
impl UpperHex for XKeyIdentifier
impl Copy for XKeyIdentifier
impl Eq for XKeyIdentifier
impl StructuralPartialEq for XKeyIdentifier
Auto Trait Implementations§
impl Freeze for XKeyIdentifier
impl RefUnwindSafe for XKeyIdentifier
impl Send for XKeyIdentifier
impl Sync for XKeyIdentifier
impl Unpin for XKeyIdentifier
impl UnwindSafe for XKeyIdentifier
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