Struct simplicity::types::Final
source · pub struct Final { /* private fields */ }Expand description
Data related to a finalized type, which can be extracted from a super::Type
if (and only if) it is finalized.
Implementations§
source§impl Final
impl Final
sourcepub fn bound(&self) -> &CompleteBound
pub fn bound(&self) -> &CompleteBound
Accessor for the type bound
sourcepub fn split_sum(&self) -> Option<(Arc<Self>, Arc<Self>)>
pub fn split_sum(&self) -> Option<(Arc<Self>, Arc<Self>)>
Return both children, if the type is a sum type
sourcepub fn split_product(&self) -> Option<(Arc<Self>, Arc<Self>)>
pub fn split_product(&self) -> Option<(Arc<Self>, Arc<Self>)>
Return both children, if the type is a product type
Trait Implementations§
source§impl<'a> DagLike for &'a Final
impl<'a> DagLike for &'a Final
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
) -> VerbosePreOrderIter<Self, S> ⓘwhere
Self: Clone,
fn verbose_pre_order_iter<S: SharingTracker<Self> + Default>(
self
) -> 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
source§impl Ord for Final
impl Ord for Final
source§impl PartialEq for Final
impl PartialEq for Final
source§impl PartialOrd for Final
impl PartialOrd for Final
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Final
Auto Trait Implementations§
impl RefUnwindSafe for Final
impl Send for Final
impl Sync for Final
impl Unpin for Final
impl UnwindSafe for Final
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