Trait ax_banyan::TreeTypes

source ·
pub trait TreeTypes: Debug + Send + Sync + Clone + 'static {
    type Key: Debug + PartialEq + Send;
    type Summary: Debug + PartialEq + Send;
    type KeySeq: CompactSeq<Item = Self::Key> + DagCbor + Clone + Debug + FromIterator<Self::Key> + Send + Sync + Summarizable<Self::Summary>;
    type SummarySeq: CompactSeq<Item = Self::Summary> + DagCbor + Clone + Debug + FromIterator<Self::Summary> + Send + Sync + Summarizable<Self::Summary>;
    type Link: Display + Debug + Hash + Eq + Clone + Copy + Send + Sync + DagCbor;

    const NONCE: &'static [u8; 24] = _;
}
Expand description

Trees can be parametrized with the key type and the sequence type. Also, to avoid a dependency on a link type with all its baggage, we parameterize the link type.

There might be more types in the future, so this essentially acts as a module for the entire code base.

Required Associated Types§

source

type Key: Debug + PartialEq + Send

key type

source

type Summary: Debug + PartialEq + Send

Type for a summary of keys. In some cases this can be the same type as the key type.

source

type KeySeq: CompactSeq<Item = Self::Key> + DagCbor + Clone + Debug + FromIterator<Self::Key> + Send + Sync + Summarizable<Self::Summary>

compact sequence type to be used for indices

source

type SummarySeq: CompactSeq<Item = Self::Summary> + DagCbor + Clone + Debug + FromIterator<Self::Summary> + Send + Sync + Summarizable<Self::Summary>

compact sequence type to be used for indices

link type to use over block boundaries

Provided Associated Constants§

source

const NONCE: &'static [u8; 24] = _

Object Safety§

This trait is not object safe.

Implementors§