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§
sourcetype Summary: Debug + PartialEq + Send
type Summary: Debug + PartialEq + Send
Type for a summary of keys. In some cases this can be the same type as the key type.
sourcetype KeySeq: CompactSeq<Item = Self::Key> + DagCbor + Clone + Debug + FromIterator<Self::Key> + Send + Sync + Summarizable<Self::Summary>
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
sourcetype SummarySeq: CompactSeq<Item = Self::Summary> + DagCbor + Clone + Debug + FromIterator<Self::Summary> + Send + Sync + Summarizable<Self::Summary>
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
Provided Associated Constants§
Object Safety§
This trait is not object safe.