Struct snarkvm_compiler::Transactions
source · [−]pub struct Transactions<N: Network> { /* private fields */ }
Implementations
sourceimpl<N: Network> Transactions<N>
impl<N: Network> Transactions<N>
sourceimpl<N: Network> Transactions<N>
impl<N: Network> Transactions<N>
sourcepub fn from(transactions: &[Transaction<N>]) -> Self
pub fn from(transactions: &[Transaction<N>]) -> Self
Initializes from a given transactions list.
sourceimpl<N: Network> Transactions<N>
impl<N: Network> Transactions<N>
sourcepub const MAX_TRANSACTIONS: usize = 65_536usize
pub const MAX_TRANSACTIONS: usize = 65_536usize
The maximum number of transactions allowed in a block.
sourcepub fn transactions(&self) -> impl '_ + Iterator<Item = &Transaction<N>>
pub fn transactions(&self) -> impl '_ + Iterator<Item = &Transaction<N>>
Returns an iterator over all transactions, for all transactions in self
.
sourcepub fn transaction_ids(&self) -> impl '_ + Iterator<Item = &N::TransactionID>
pub fn transaction_ids(&self) -> impl '_ + Iterator<Item = &N::TransactionID>
Returns an iterator over the transaction IDs, for all transactions in self
.
sourcepub fn deployments(&self) -> impl '_ + Iterator<Item = &Deployment<N>>
pub fn deployments(&self) -> impl '_ + Iterator<Item = &Deployment<N>>
Returns an iterator over all transactions in self
that are deployments.
sourcepub fn executions(&self) -> impl '_ + Iterator<Item = &Execution<N>>
pub fn executions(&self) -> impl '_ + Iterator<Item = &Execution<N>>
Returns an iterator over all transactions in self
that are executions.
sourcepub fn transitions(&self) -> impl '_ + Iterator<Item = &Transition<N>>
pub fn transitions(&self) -> impl '_ + Iterator<Item = &Transition<N>>
Returns an iterator over all transitions.
sourcepub fn transition_ids(&self) -> impl '_ + Iterator<Item = &N::TransitionID>
pub fn transition_ids(&self) -> impl '_ + Iterator<Item = &N::TransitionID>
Returns an iterator over the transition IDs, for all transitions.
sourcepub fn transition_public_keys(&self) -> impl '_ + Iterator<Item = &Group<N>>
pub fn transition_public_keys(&self) -> impl '_ + Iterator<Item = &Group<N>>
Returns an iterator over the transition public keys, for all transactions.
sourcepub fn origins(&self) -> impl '_ + Iterator<Item = &Origin<N>>
pub fn origins(&self) -> impl '_ + Iterator<Item = &Origin<N>>
Returns an iterator over the origins, for all transition inputs that are records.
Returns an iterator over the tags, for all transition inputs that are records.
sourcepub fn serial_numbers(&self) -> impl '_ + Iterator<Item = &Field<N>>
pub fn serial_numbers(&self) -> impl '_ + Iterator<Item = &Field<N>>
Returns an iterator over the serial numbers, for all transition inputs that are records.
sourcepub fn commitments(&self) -> impl '_ + Iterator<Item = &Field<N>>
pub fn commitments(&self) -> impl '_ + Iterator<Item = &Field<N>>
Returns an iterator over the commitments, for all transition outputs that are records.
sourceimpl<N: Network> Transactions<N>
impl<N: Network> Transactions<N>
sourcepub fn into_transactions(self) -> impl Iterator<Item = Transaction<N>>
pub fn into_transactions(self) -> impl Iterator<Item = Transaction<N>>
Returns a consuming iterator over all transactions, for all transactions in self
.
sourcepub fn into_transaction_ids(self) -> impl Iterator<Item = N::TransactionID>
pub fn into_transaction_ids(self) -> impl Iterator<Item = N::TransactionID>
Returns a consuming iterator over the transaction IDs, for all transactions in self
.
sourcepub fn into_deployments(self) -> impl Iterator<Item = Deployment<N>>
pub fn into_deployments(self) -> impl Iterator<Item = Deployment<N>>
Returns a consuming iterator over all transactions in self
that are deployments.
sourcepub fn into_executions(self) -> impl Iterator<Item = Execution<N>>
pub fn into_executions(self) -> impl Iterator<Item = Execution<N>>
Returns a consuming iterator over all transactions in self
that are executions.
sourcepub fn into_transitions(self) -> impl Iterator<Item = Transition<N>>
pub fn into_transitions(self) -> impl Iterator<Item = Transition<N>>
Returns a consuming iterator over all transitions.
sourcepub fn into_transition_ids(self) -> impl Iterator<Item = N::TransitionID>
pub fn into_transition_ids(self) -> impl Iterator<Item = N::TransitionID>
Returns a consuming iterator over the transition IDs, for all transitions.
sourcepub fn into_transition_public_keys(self) -> impl Iterator<Item = Group<N>>
pub fn into_transition_public_keys(self) -> impl Iterator<Item = Group<N>>
Returns a consuming iterator over the transition public keys, for all transactions.
sourcepub fn into_origins(self) -> impl Iterator<Item = Origin<N>>
pub fn into_origins(self) -> impl Iterator<Item = Origin<N>>
Returns a consuming iterator over the origins, for all transition inputs that are records.
Returns a consuming iterator over the tags, for all transition inputs that are records.
sourcepub fn into_serial_numbers(self) -> impl Iterator<Item = Field<N>>
pub fn into_serial_numbers(self) -> impl Iterator<Item = Field<N>>
Returns a consuming iterator over the serial numbers, for all transition inputs that are records.
sourcepub fn into_commitments(self) -> impl Iterator<Item = Field<N>>
pub fn into_commitments(self) -> impl Iterator<Item = Field<N>>
Returns a consuming iterator over the commitments, for all transition outputs that are records.
sourcepub fn into_nonces(self) -> impl Iterator<Item = Group<N>>
pub fn into_nonces(self) -> impl Iterator<Item = Group<N>>
Returns a consuming iterator over the nonces, for all transition outputs that are records.
Methods from Deref<Target = IndexMap<N::TransactionID, Transaction<N>>>
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the number of key-value pairs in the map.
Computes in O(1) time.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the map contains no elements.
Computes in O(1) time.
sourcepub fn iter(&self) -> Iter<'_, K, V>
pub fn iter(&self) -> Iter<'_, K, V>
Return an iterator over the key-value pairs of the map, in their order
sourcepub fn contains_key<Q>(&self, key: &Q) -> bool where
Q: Hash + Equivalent<K> + ?Sized,
pub fn contains_key<Q>(&self, key: &Q) -> bool where
Q: Hash + Equivalent<K> + ?Sized,
Return true
if an equivalent to key
exists in the map.
Computes in O(1) time (average).
sourcepub fn get<Q>(&self, key: &Q) -> Option<&V> where
Q: Hash + Equivalent<K> + ?Sized,
pub fn get<Q>(&self, key: &Q) -> Option<&V> where
Q: Hash + Equivalent<K> + ?Sized,
Return a reference to the value stored for key
, if it is present,
else None
.
Computes in O(1) time (average).
sourcepub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)> where
Q: Hash + Equivalent<K> + ?Sized,
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)> where
Q: Hash + Equivalent<K> + ?Sized,
Return references to the key-value pair stored for key
,
if it is present, else None
.
Computes in O(1) time (average).
sourcepub fn get_full<Q>(&self, key: &Q) -> Option<(usize, &K, &V)> where
Q: Hash + Equivalent<K> + ?Sized,
pub fn get_full<Q>(&self, key: &Q) -> Option<(usize, &K, &V)> where
Q: Hash + Equivalent<K> + ?Sized,
Return item index, key and value
sourcepub fn get_index_of<Q>(&self, key: &Q) -> Option<usize> where
Q: Hash + Equivalent<K> + ?Sized,
pub fn get_index_of<Q>(&self, key: &Q) -> Option<usize> where
Q: Hash + Equivalent<K> + ?Sized,
Return item index, if it exists in the map
Computes in O(1) time (average).
sourcepub fn par_keys(&self) -> ParKeys<'_, K, V>
pub fn par_keys(&self) -> ParKeys<'_, K, V>
Return a parallel iterator over the keys of the map.
While parallel iterators can process items in any order, their relative order
in the map is still preserved for operations like reduce
and collect
.
sourcepub fn par_values(&self) -> ParValues<'_, K, V>
pub fn par_values(&self) -> ParValues<'_, K, V>
Return a parallel iterator over the values of the map.
While parallel iterators can process items in any order, their relative order
in the map is still preserved for operations like reduce
and collect
.
Trait Implementations
sourceimpl<N: Clone + Network> Clone for Transactions<N> where
N::TransactionID: Clone,
impl<N: Clone + Network> Clone for Transactions<N> where
N::TransactionID: Clone,
sourcefn clone(&self) -> Transactions<N>
fn clone(&self) -> Transactions<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<N: Network> Debug for Transactions<N>
impl<N: Network> Debug for Transactions<N>
sourceimpl<N: Network> Deref for Transactions<N>
impl<N: Network> Deref for Transactions<N>
type Target = IndexMap<<N as Network>::TransactionID, Transaction<N>, RandomState>
type Target = IndexMap<<N as Network>::TransactionID, Transaction<N>, RandomState>
The resulting type after dereferencing.
sourceimpl<'de, N: Network> Deserialize<'de> for Transactions<N>
impl<'de, N: Network> Deserialize<'de> for Transactions<N>
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the transactions from a JSON-string or buffer.
sourceimpl<N: Network> Display for Transactions<N>
impl<N: Network> Display for Transactions<N>
sourceimpl<N: Network> FromBytes for Transactions<N>
impl<N: Network> FromBytes for Transactions<N>
sourceimpl<'a, N: Network> FromIterator<&'a Transaction<N>> for Transactions<N>
impl<'a, N: Network> FromIterator<&'a Transaction<N>> for Transactions<N>
sourcefn from_iter<T: IntoIterator<Item = &'a Transaction<N>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = &'a Transaction<N>>>(iter: T) -> Self
Initializes from an iterator of transactions.
sourceimpl<N: Network> FromIterator<Transaction<N>> for Transactions<N>
impl<N: Network> FromIterator<Transaction<N>> for Transactions<N>
sourcefn from_iter<T: IntoIterator<Item = Transaction<N>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Transaction<N>>>(iter: T) -> Self
Initializes from an iterator of transactions.
sourceimpl<N: Network> FromStr for Transactions<N>
impl<N: Network> FromStr for Transactions<N>
sourceimpl<N: PartialEq + Network> PartialEq<Transactions<N>> for Transactions<N> where
N::TransactionID: PartialEq,
impl<N: PartialEq + Network> PartialEq<Transactions<N>> for Transactions<N> where
N::TransactionID: PartialEq,
sourcefn eq(&self, other: &Transactions<N>) -> bool
fn eq(&self, other: &Transactions<N>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<N: Network> Serialize for Transactions<N>
impl<N: Network> Serialize for Transactions<N>
sourceimpl<N: Network> ToBytes for Transactions<N>
impl<N: Network> ToBytes for Transactions<N>
impl<N: Eq + Network> Eq for Transactions<N> where
N::TransactionID: Eq,
impl<N: Network> StructuralEq for Transactions<N>
impl<N: Network> StructuralPartialEq for Transactions<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for Transactions<N> where
N: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G2Affine: RefUnwindSafe,
<<<N as Environment>::PairingCurve as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
<N as Network>::StateRoot: RefUnwindSafe,
<N as Network>::TransactionID: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
impl<N> Send for Transactions<N>
impl<N> Sync for Transactions<N>
impl<N> Unpin for Transactions<N> where
N: Unpin,
<N as Environment>::Field: Unpin,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin,
<<N as Environment>::PairingCurve as PairingEngine>::G2Affine: Unpin,
<<<N as Environment>::PairingCurve as PairingEngine>::G2Affine as PairingCurve>::Prepared: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
<N as Network>::StateRoot: Unpin,
<N as Network>::TransactionID: Unpin,
<N as Network>::TransitionID: Unpin,
impl<N> UnwindSafe for Transactions<N> where
N: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G2Affine: UnwindSafe,
<<<N as Environment>::PairingCurve as PairingEngine>::G2Affine as PairingCurve>::Prepared: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
<N as Network>::StateRoot: UnwindSafe,
<N as Network>::TransactionID: UnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more