Trait 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§

Source

type CachedData: Clone

Precomputed data about the node, such as its type arrow or various Merkle roots.

Source

type Witness: Clone

Type of witness data attached to DAGs of this node type. Typically either Value or NoWitness.

Source

type Disconnect: Disconnectable<Node<Self>> + Clone

Type of disconnect data attached to DAGs of this node type.

Source

type SharingId: Hash + Clone + Eq

A type which uniquely identifies a node, for purposes of sharing during iteration over the DAG.

Source

type Jet: Jet

The jet catalogue used with this node type.

Required Methods§

Source

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§