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
.
pub fn push_sequence_events_hash(
sequence_events_hash: SequenceEventsHash,
sequence_state_hash: SequenceStateHash
) -> SequenceStateHash
pub fn push_sequence_events_hash(
sequence_events_hash: SequenceEventsHash,
sequence_state_hash: SequenceStateHash
) -> 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,
))
pub fn push_sequence_events(
sequence_events: &SequenceEvents<'_>,
sequence_state_hash: SequenceStateHash
) -> SequenceStateHash
pub fn push_sequence_events(
sequence_events: &SequenceEvents<'_>,
sequence_state_hash: SequenceStateHash
) -> SequenceStateHash
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
Auto Trait Implementations
impl RefUnwindSafe for SequenceStateHash
impl Send for SequenceStateHash
impl Sync for SequenceStateHash
impl Unpin for SequenceStateHash
impl UnwindSafe for SequenceStateHash
Blanket Implementations
Mutably borrows from an owned value. Read more