Struct snapps_txn_reference_impl::sequence_event::SequenceStateHash[][src]

pub struct SequenceStateHash(pub Fp);
Expand description

A hash representing the current sequence state.

Tuple Fields

0: Fp

Implementations

The hash representing an empty list of sequence events. Equivalent to Hash::empty_sequence_state wrapped by SequenceStateHash.

The hash formed by hash-consing sequence_events_hash with sequence_state_hash.

Creates a HashInput formed by adding the sequence_state_hash and sequence_state_hash field elements in order, then computing the resulting hash with HashPrefixState::sequence_state.

let mut hash_input = HashInput::empty();
HashInput::add_field(&mut hash_input, sequence_events_hash.0);
HashInput::add_field(&mut hash_input, sequence_state_hash.0);
SequenceStateHash(Hash::compute_hash(
    HashPrefixState::sequence_state(),
    hash_input,
))

The hash formed by hash-consing sequence_events’s hash with sequence_state_hash.

Equivalent to calling SequenceStateHash::push_sequence_events on the result of SequenceEventsHash::of_sequence_events:

SequenceStateHash::push_sequence_events_hash(
    SequenceEvents::hash(sequence_events),
    sequence_state_hash,
)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Performs the conversion.

Performs the conversion.

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.