pub struct ValueRef<'v> { /* private fields */ }Expand description
Reference to a value, or to a sub-value of a value.
Implementations§
Source§impl<'v> ValueRef<'v>
impl<'v> ValueRef<'v>
Sourcepub fn as_product(&self) -> Option<(Self, Self)>
pub fn as_product(&self) -> Option<(Self, Self)>
Access the inner values of a product value.
Sourcepub fn raw_byte_iter(&self) -> RawByteIter<'v>
pub fn raw_byte_iter(&self) -> RawByteIter<'v>
Yields an iterator over the “raw bytes” of the value.
The returned bytes match the padded bit-encoding of the value. You
may wish to call Self::iter_padded instead to obtain the bits,
but this method is more efficient in some contexts.
Sourcepub fn iter_compact(&self) -> CompactBitsIter<'v>
pub fn iter_compact(&self) -> CompactBitsIter<'v>
Return an iterator over the compact bit encoding of the value.
This encoding is used for writing witness data and for computing IHRs.
Sourcepub fn iter_padded(&self) -> PreOrderIter<'v>
pub fn iter_padded(&self) -> PreOrderIter<'v>
Return an iterator over the padded bit encoding of the value.
This encoding is used to represent the value in the Bit Machine.
Trait Implementations§
Source§impl DagLike for ValueRef<'_>
impl DagLike for ValueRef<'_>
Source§fn as_dag_node(&self) -> Dag<Self>
fn as_dag_node(&self) -> Dag<Self>
Interpret the node as a DAG node
Source§fn left_child(&self) -> Option<Self>
fn left_child(&self) -> Option<Self>
Accessor for the left child of the node, if one exists
Source§fn right_child(&self) -> Option<Self>
fn right_child(&self) -> Option<Self>
Accessor for the right child of the node, if one exists
Source§fn n_children(&self) -> usize
fn n_children(&self) -> usize
Number of children that the node has. Read more
Source§fn rtl_post_order_iter<S: SharingTracker<SwapChildren<Self>> + Default>(
self,
) -> RtlPostOrderIter<Self, S>
fn rtl_post_order_iter<S: SharingTracker<SwapChildren<Self>> + Default>( self, ) -> RtlPostOrderIter<Self, S>
Obtains an iterator of all the nodes rooted at the DAG, in right-to-left post order. Read more
Source§fn pre_order_iter<S: SharingTracker<Self> + Default>(
self,
) -> PreOrderIter<Self, S> ⓘ
fn pre_order_iter<S: SharingTracker<Self> + Default>( self, ) -> PreOrderIter<Self, S> ⓘ
Obtains an iterator of all the nodes rooted at the DAG, in pre-order.
Source§fn verbose_pre_order_iter<S: SharingTracker<Self> + Default>(
self,
max_depth: Option<usize>,
) -> VerbosePreOrderIter<Self, S> ⓘwhere
Self: Clone,
fn verbose_pre_order_iter<S: SharingTracker<Self> + Default>(
self,
max_depth: Option<usize>,
) -> VerbosePreOrderIter<Self, S> ⓘwhere
Self: Clone,
Obtains a verbose iterator of all the nodes rooted at the DAG, in pre-order. Read more
Source§fn post_order_iter<S: SharingTracker<Self> + Default>(
self,
) -> PostOrderIter<Self, S> ⓘ
fn post_order_iter<S: SharingTracker<Self> + Default>( self, ) -> PostOrderIter<Self, S> ⓘ
Obtains an iterator of all the nodes rooted at the DAG, in post order. Read more
Checks whether a DAG’s internal sharing (as expressed by shared pointers)
matches the given target sharing.
Source§fn post_order_iter_with_tracker<S: SharingTracker<Self>>(
self,
tracker: S,
) -> PostOrderIter<Self, S> ⓘ
fn post_order_iter_with_tracker<S: SharingTracker<Self>>( self, tracker: S, ) -> PostOrderIter<Self, S> ⓘ
Obtains an post-order iterator of all the nodes rooted at DAG, using the
given tracker. Read more
impl<'v> Copy for ValueRef<'v>
Auto Trait Implementations§
impl<'v> Freeze for ValueRef<'v>
impl<'v> RefUnwindSafe for ValueRef<'v>
impl<'v> Send for ValueRef<'v>
impl<'v> Sync for ValueRef<'v>
impl<'v> Unpin for ValueRef<'v>
impl<'v> UnwindSafe for ValueRef<'v>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more