pub trait ChainItem: Clone + PartialEq + Eq + Debug + Send + Sync {
    type Hash: Into<ActionHash> + Clone + PartialEq + Eq + Ord + Hash + Debug + Send + Sync;

    // Required methods
    fn seq(&self) -> u32;
    fn get_hash(&self) -> &Self::Hash;
    fn prev_hash(&self) -> Option<&Self::Hash>;
}
Expand description

Abstraction over an item in a chain.

Required Associated Types§

source

type Hash: Into<ActionHash> + Clone + PartialEq + Eq + Ord + Hash + Debug + Send + Sync

The type used to represent a hash of this item

Required Methods§

source

fn seq(&self) -> u32

The sequence in the chain

source

fn get_hash(&self) -> &Self::Hash

The hash of this item

source

fn prev_hash(&self) -> Option<&Self::Hash>

The hash of the previous item

Implementors§