Struct bitcoins::prelude::Hash160Digest [−][src]
pub struct Hash160Digest(_);
Expand description
A bitcoin-style Hash160
Implementations
Unwrap the marked digest, returning the underlying GenericArray
Trait Implementations
Performs the conversion.
Performs the conversion.
Returns the byte-length of the serialized data structure.
pub fn read_from<R>(reader: &mut R) -> Result<Hash160Digest, SerError> where
R: Read,
Hash160Digest: Sized,
pub fn read_from<R>(reader: &mut R) -> Result<Hash160Digest, SerError> where
R: Read,
Hash160Digest: 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
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
fn read_seq_from<R>(
reader: &mut R,
mode: ReadSeqMode
) -> Result<Vec<Self, Global>, Self::Error> where
R: Read,
fn read_seq_from<R>(
reader: &mut R,
mode: ReadSeqMode
) -> Result<Vec<Self, Global>, Self::Error> where
R: Read,
Read a sequence of exactly limit
objects from the reader.
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
Decodes a hex string to a Vec<u8>
, deserializes an instance of Self
from that vector.
Serialize self
to a base64 string, using standard RFC4648 non-url safe characters
Serializes self
to a vector, returns the hex-encoded vector
Serialize self
to a base64 string, using standard RFC4648 non-url safe characters
Returns the “default value” for a type. Read more
impl<T> From<T> for Hash160Digest where
T: Into<GenericArray<u8, <Hash160 as Digest>::OutputSize>>,
impl<T> From<T> for Hash160Digest where
T: Into<GenericArray<u8, <Hash160 as Digest>::OutputSize>>,
Performs the conversion.
Produce a marked digest from the hasher
Shortcut to produce a marked digest
Deserialize to BE hex
Use as a mutable slice
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Hash160Digest
impl Send for Hash160Digest
impl Sync for Hash160Digest
impl Unpin for Hash160Digest
impl UnwindSafe for Hash160Digest
Blanket Implementations
Calculate the base32 serialized length
Mutably borrows from an owned value. Read more
pub fn write_base32<W>(
&self,
writer: &mut W
) -> Result<(), <W as WriteBase32>::Err> where
W: WriteBase32,
pub fn write_base32<W>(
&self,
writer: &mut W
) -> Result<(), <W as WriteBase32>::Err> where
W: WriteBase32,
Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate. Read more