pub struct Sha256dHash(pub [u8; 32]);
Expand description

A Bitcoin hash, 32-bytes, computed from x as SHA256(SHA256(x))

Tuple Fields

0: [u8; 32]

Implementations

Converts the object to a raw pointer

Converts the object to a mutable raw pointer

Returns the length of the object as an array

Returns whether the object, as an array, is empty. Always false.

Returns the underlying bytes.

Returns the underlying bytes.

Returns the underlying bytes.

Create a hash by hashing some data

Converts a hash to a little-endian Uint256

Converts a hash to a big-endian Uint256

Decodes a big-endian (i.e. reversed vs sha256sum output) hex string as a Sha256dHash

Human-readable hex output

Human-readable hex output

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Decode an object with a well-defined format

Encode an object with a well-defined format

Output the raw sha256d hash, not reversing it (unlike Display and what Core does for user display)

Returns the “default value” for a type. Read more

Output the sha256d hash in reverse, copying Bitcoin Core’s behaviour

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Output the sha256d hash in reverse, copying Bitcoin Core’s behaviour

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Output the sha256d hash in reverse, copying Bitcoin Core’s behaviour

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

Decode u8 slices as UTF-8 and iterate over the codepoints as Utf8Chars, Read more

Decode u16 slices as UTF-16 and iterate over the codepoints as Utf16Chars, Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more