Struct coins_bip32::primitives::KeyFingerprint

source ·
pub struct KeyFingerprint(pub [u8; 4]);
Expand description

A 4-byte key fingerprint

Tuple Fields§

§0: [u8; 4]

Implementations§

source§

impl KeyFingerprint

source

pub fn eq_slice(self, other: &[u8]) -> bool

Determines if the slice represents the same key fingerprint

Trait Implementations§

source§

impl ByteFormat for KeyFingerprint

§

type Error = Bip32Error

An associated error type
source§

fn serialized_length(&self) -> usize

Returns the byte-length of the serialized data structure.
source§

fn read_from<R>(reader: &mut R) -> Result<Self, Self::Error>
where R: Read, Self: Sized,

Deserializes an instance of Self from a std::io::Read. The limit argument is used only when deserializing collections, and specifies a maximum number of instances of the underlying type to read. Read more
source§

fn write_to<W>(&self, writer: &mut W) -> Result<usize, Self::Error>
where W: Write,

Serializes self to a std::io::Write. Following Write trait conventions, its Ok type must be a usize denoting the number of bytes written. Read more
source§

fn read_seq_from<R>( reader: &mut R, mode: ReadSeqMode, ) -> Result<Vec<Self>, Self::Error>
where R: Read, Self: Sized,

Read a sequence of objects from the reader. The mode argument specifies how many objects to read.
source§

fn write_seq_to<'a, W, E, Iter, Item>( writer: &mut W, iter: Iter, ) -> Result<usize, Self::Error>
where W: Write, E: Into<Self::Error> + From<SerError> + From<Error> + Error, Item: 'a + ByteFormat<Error = E>, Iter: IntoIterator<Item = &'a Item>,

Write a sequence of ByteFormat objects to a writer. The iter argument may be any object that implements IntoIterator<Item = &Item>. This means we can seamlessly use vectors, slices, etc. Read more
source§

fn deserialize_hex(s: &str) -> Result<Self, Self::Error>
where Self: Sized,

Decodes a hex string to a Vec<u8>, deserializes an instance of Self from that vector.
source§

fn deserialize_base64(s: &str) -> Result<Self, Self::Error>
where Self: Sized,

Serialize self to a base64 string, using standard RFC4648 non-url safe characters
source§

fn serialize_hex(&self) -> String

Serializes self to a vector, returns the hex-encoded vector
source§

fn serialize_base64(&self) -> String

Serialize self to a base64 string, using standard RFC4648 non-url safe characters
source§

impl Clone for KeyFingerprint

source§

fn clone(&self) -> KeyFingerprint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for KeyFingerprint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for KeyFingerprint

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<[u8; 4]> for KeyFingerprint

source§

fn from(v: [u8; 4]) -> Self

Converts to this type from the input type.
source§

impl PartialEq for KeyFingerprint

source§

fn eq(&self, other: &KeyFingerprint) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for KeyFingerprint

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for KeyFingerprint

source§

impl Eq for KeyFingerprint

source§

impl StructuralPartialEq for KeyFingerprint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,