Struct snarkvm_compiler::StatePath
source · [−]pub struct StatePath<N: Network> { /* private fields */ }
Implementations
sourceimpl<N: Network> StatePath<N>
impl<N: Network> StatePath<N>
sourcepub fn new(
state_root: N::StateRoot,
block_path: BlockPath<N>,
block_hash: N::BlockHash,
previous_block_hash: N::BlockHash,
header_root: Field<N>,
header_path: HeaderPath<N>,
header_leaf: HeaderLeaf<N>,
transactions_path: TransactionsPath<N>,
transaction_id: N::TransactionID,
transaction_path: TransactionPath<N>,
transaction_leaf: TransactionLeaf<N>,
transition_path: TransitionPath<N>,
transition_leaf: TransitionLeaf<N>
) -> Result<Self>
pub fn new(
state_root: N::StateRoot,
block_path: BlockPath<N>,
block_hash: N::BlockHash,
previous_block_hash: N::BlockHash,
header_root: Field<N>,
header_path: HeaderPath<N>,
header_leaf: HeaderLeaf<N>,
transactions_path: TransactionsPath<N>,
transaction_id: N::TransactionID,
transaction_path: TransactionPath<N>,
transaction_leaf: TransactionLeaf<N>,
transition_path: TransitionPath<N>,
transition_leaf: TransitionLeaf<N>
) -> Result<Self>
Initializes a new instance of StatePath
.
sourcepub const fn state_root(&self) -> N::StateRoot
pub const fn state_root(&self) -> N::StateRoot
Returns the state root.
sourcepub const fn block_path(&self) -> &BlockPath<N>
pub const fn block_path(&self) -> &BlockPath<N>
Returns the block path.
sourcepub const fn block_hash(&self) -> N::BlockHash
pub const fn block_hash(&self) -> N::BlockHash
Returns the block hash.
sourcepub const fn previous_block_hash(&self) -> N::BlockHash
pub const fn previous_block_hash(&self) -> N::BlockHash
Returns the previous block hash.
sourcepub const fn header_root(&self) -> &Field<N>
pub const fn header_root(&self) -> &Field<N>
Returns the block header root.
sourcepub const fn header_path(&self) -> &HeaderPath<N>
pub const fn header_path(&self) -> &HeaderPath<N>
Returns the header path.
sourcepub const fn header_leaf(&self) -> &HeaderLeaf<N>
pub const fn header_leaf(&self) -> &HeaderLeaf<N>
Returns the header leaf.
sourcepub const fn transactions_path(&self) -> &TransactionsPath<N>
pub const fn transactions_path(&self) -> &TransactionsPath<N>
Returns the transactions path.
sourcepub const fn transaction_id(&self) -> &N::TransactionID
pub const fn transaction_id(&self) -> &N::TransactionID
Returns the transaction ID.
sourcepub const fn transaction_path(&self) -> &TransactionPath<N>
pub const fn transaction_path(&self) -> &TransactionPath<N>
Returns the Merkle path for the transaction leaf.
sourcepub const fn transaction_leaf(&self) -> &TransactionLeaf<N>
pub const fn transaction_leaf(&self) -> &TransactionLeaf<N>
Returns the transaction leaf.
sourcepub const fn transition_path(&self) -> &TransitionPath<N>
pub const fn transition_path(&self) -> &TransitionPath<N>
Returns the Merkle path for the transition leaf.
sourcepub const fn transition_leaf(&self) -> &TransitionLeaf<N>
pub const fn transition_leaf(&self) -> &TransitionLeaf<N>
Returns the transition leaf.
Trait Implementations
sourceimpl<N: Clone + Network> Clone for StatePath<N> where
N::StateRoot: Clone,
N::BlockHash: Clone,
N::BlockHash: Clone,
N::TransactionID: Clone,
impl<N: Clone + Network> Clone for StatePath<N> where
N::StateRoot: Clone,
N::BlockHash: Clone,
N::BlockHash: Clone,
N::TransactionID: Clone,
sourceimpl<'de, N: Network> Deserialize<'de> for StatePath<N>
impl<'de, N: Network> Deserialize<'de> for StatePath<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 state path from a string or bytes.
sourceimpl<N: PartialEq + Network> PartialEq<StatePath<N>> for StatePath<N> where
N::StateRoot: PartialEq,
N::BlockHash: PartialEq,
N::BlockHash: PartialEq,
N::TransactionID: PartialEq,
impl<N: PartialEq + Network> PartialEq<StatePath<N>> for StatePath<N> where
N::StateRoot: PartialEq,
N::BlockHash: PartialEq,
N::BlockHash: PartialEq,
N::TransactionID: PartialEq,
impl<N: Eq + Network> Eq for StatePath<N> where
N::StateRoot: Eq,
N::BlockHash: Eq,
N::BlockHash: Eq,
N::TransactionID: Eq,
impl<N: Network> StructuralEq for StatePath<N>
impl<N: Network> StructuralPartialEq for StatePath<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for StatePath<N> where
N: RefUnwindSafe,
<N as Network>::BlockHash: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Network>::StateRoot: RefUnwindSafe,
<N as Network>::TransactionID: RefUnwindSafe,
impl<N> Send for StatePath<N>
impl<N> Sync for StatePath<N>
impl<N> Unpin for StatePath<N> where
N: Unpin,
<N as Network>::BlockHash: Unpin,
<N as Environment>::Field: Unpin,
<N as Network>::StateRoot: Unpin,
<N as Network>::TransactionID: Unpin,
impl<N> UnwindSafe for StatePath<N> where
N: UnwindSafe,
<N as Network>::BlockHash: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<N as Network>::StateRoot: UnwindSafe,
<N as Network>::TransactionID: 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