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§
Trait Implementations§
source§impl ByteFormat for KeyFingerprint
impl ByteFormat for KeyFingerprint
§type Error = Bip32Error
type Error = Bip32Error
An associated error type
source§fn serialized_length(&self) -> usize
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,
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 moresource§fn write_to<W>(&self, writer: &mut W) -> Result<usize, Self::Error>where
W: Write,
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 moresource§fn read_seq_from<R>(
reader: &mut R,
mode: ReadSeqMode
) -> Result<Vec<Self, Global>, Self::Error>where
R: Read,
Self: Sized,
fn read_seq_from<R>( reader: &mut R, mode: ReadSeqMode ) -> Result<Vec<Self, Global>, 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>,
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 moresource§fn deserialize_hex(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
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,
fn deserialize_base64(s: &str) -> Result<Self, Self::Error>where Self: Sized,
Serialize
self
to a base64 string, using standard RFC4648 non-url safe characterssource§fn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serializes
self
to a vector, returns the hex-encoded vectorsource§fn serialize_base64(&self) -> String
fn serialize_base64(&self) -> String
Serialize
self
to a base64 string, using standard RFC4648 non-url safe characterssource§impl Clone for KeyFingerprint
impl Clone for KeyFingerprint
source§fn clone(&self) -> KeyFingerprint
fn clone(&self) -> KeyFingerprint
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 moresource§impl Debug for KeyFingerprint
impl Debug for KeyFingerprint
source§impl<'de> Deserialize<'de> for KeyFingerprint
impl<'de> Deserialize<'de> for KeyFingerprint
source§fn 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
source§impl PartialEq<KeyFingerprint> for KeyFingerprint
impl PartialEq<KeyFingerprint> for KeyFingerprint
source§fn eq(&self, other: &KeyFingerprint) -> bool
fn eq(&self, other: &KeyFingerprint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for KeyFingerprint
impl Serialize for KeyFingerprint
impl Copy for KeyFingerprint
impl Eq for KeyFingerprint
impl StructuralEq for KeyFingerprint
impl StructuralPartialEq for KeyFingerprint
Auto Trait Implementations§
impl RefUnwindSafe for KeyFingerprint
impl Send for KeyFingerprint
impl Sync for KeyFingerprint
impl Unpin for KeyFingerprint
impl UnwindSafe for KeyFingerprint
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