Struct simplicity::dag::MaxSharing
source · pub struct MaxSharing<N: Marker> { /* private fields */ }Expand description
Maximal sharing: share every node whose CMR and cached data match
For RedeemNodes, this coincides with FullSharing; for other
types of nodes it represents “as much sharing as we can currently
safely do”.
Trait Implementations§
source§impl<N: Clone + Marker> Clone for MaxSharing<N>
impl<N: Clone + Marker> Clone for MaxSharing<N>
source§fn clone(&self) -> MaxSharing<N>
fn clone(&self) -> MaxSharing<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<N: Marker> Default for MaxSharing<N>
impl<N: Marker> Default for MaxSharing<N>
source§impl<N: PartialEq + Marker> PartialEq for MaxSharing<N>
impl<N: PartialEq + Marker> PartialEq for MaxSharing<N>
source§fn eq(&self, other: &MaxSharing<N>) -> bool
fn eq(&self, other: &MaxSharing<N>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<N: Marker> SharingTracker<&Node<N>> for MaxSharing<N>
impl<N: Marker> SharingTracker<&Node<N>> for MaxSharing<N>
source§impl<N: Marker> SharingTracker<Arc<Node<N>>> for MaxSharing<N>
impl<N: Marker> SharingTracker<Arc<Node<N>>> for MaxSharing<N>
source§impl<N, D> SharingTracker<SwapChildren<D>> for MaxSharing<N>
impl<N, D> SharingTracker<SwapChildren<D>> for MaxSharing<N>
source§fn record(&mut self, d: &SwapChildren<D>, index: usize) -> Option<usize>
fn record(&mut self, d: &SwapChildren<D>, index: usize) -> Option<usize>
Marks an object as having been seen, and record the index
when it was seen. Read more
source§fn seen_before(&self, d: &SwapChildren<D>) -> Option<usize>
fn seen_before(&self, d: &SwapChildren<D>) -> Option<usize>
Check whether an object has been seen before; if so, return
the index it was recorded at.
impl<N: Eq + Marker> Eq for MaxSharing<N>
impl<N: Marker> StructuralPartialEq for MaxSharing<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for MaxSharing<N>
impl<N> Send for MaxSharing<N>
impl<N> Sync for MaxSharing<N>
impl<N> Unpin for MaxSharing<N>
impl<N> UnwindSafe for MaxSharing<N>
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