Struct snapps_txn_reference_impl::sequence_event::SequenceEventsHash[][src]

pub struct SequenceEventsHash(pub Fp);
Expand description

A hash representing a list of sequence events.

Tuple Fields

0: Fp

Implementations

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

The hash formed by hash-consing sequence_event_hash with sequence_events_hash.

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

let mut hash_input = HashInput::empty();
HashInput::add_field(&mut hash_input, sequence_event_hash);
HashInput::add_field(&mut hash_input, sequence_events_hash.0);

SequenceEventsHash(Hash::compute_hash(
    HashPrefixState::sequence_events_list(),
    hash_input,
))

The hash formed by hash-consing sequence_event’s hash with sequence_events_hash.

Equivalent to calling SequenceEventsHash::push_sequence_event on the result of SequenceEvent::hash:

SequenceEventsHash::push_sequence_event_hash(
    SequenceEvent::hash(sequence_event),
    sequence_events_hash,
)

Compute the hash of sequence_events by starting with empty and calling push_sequence_event on each event in turn.

let mut sequence_events_hash = SequenceEventsHash::empty();
for sequence_event in sequence_events.iter() {
    sequence_events_hash =
        SequenceEventsHash::push_sequence_event(sequence_event, sequence_events_hash)
}
sequence_events_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.