Trait simplicity::node::Marker
source · pub trait Marker: Copy + Clone + PartialEq + Eq + PartialOrd + Ord + Debug + Hash {
type CachedData: Clone;
type Witness: Clone;
type Disconnect: Disconnectable<Node<Self>> + Clone;
type SharingId: Hash + Clone + Eq;
type Jet: Jet;
// Required method
fn compute_sharing_id(
cmr: Cmr,
cached_data: &Self::CachedData
) -> Option<Self::SharingId>;
}Required Associated Types§
sourcetype CachedData: Clone
type CachedData: Clone
Precomputed data about the node, such as its type arrow or various Merkle roots.
sourcetype Disconnect: Disconnectable<Node<Self>> + Clone
type Disconnect: Disconnectable<Node<Self>> + Clone
Type of disconnect data attached to DAGs of this node type.
Required Methods§
sourcefn compute_sharing_id(
cmr: Cmr,
cached_data: &Self::CachedData
) -> Option<Self::SharingId>
fn compute_sharing_id( cmr: Cmr, cached_data: &Self::CachedData ) -> Option<Self::SharingId>
Yields the sharing ID for a given type, starting from its CMR and its cached data.
If the type cannot be uniquely identified (e.g. because it is missing data), then
this method returns None. In this case, the node will not be shared with any
other node.
Object Safety§
This trait is not object safe.