pub struct HashValue { /* private fields */ }
Expand description

This is a part of the HashHeader. The HashValue-struct contains the appropriate hash algorithm and the hash. This struct has a version also.

Implementations

creates a new HashValue for the given parameters.

creates a new, empty HashValue for a given hashtype.

returns the type of hash as HashType.

sets the hash value.

returns the underlying hash value

sets the appropriate ed25519 signature

returns the appropriate signature

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

the return value for decode_content(), decode_directly(), decode_for_key();

returns the identifier (=Magic bytes) of the header.

returns the version of the header.

encodes the header.

decodes the content of the header.

returns the size of the encoded header (in bytes)

encodes a given key.

encodes the (header) value/object directly (= without key).

encodes a key to the (header) value/object.

decodes the length of the header.

checks if the read identifier is valid for this header.

helper method to check, if the key is on position.

decodes the header directly.

decodes the header for the given key.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

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

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.