Trait casper_node::types::Item[][src]

pub trait Item: Clone + Serialize + DeserializeOwned + Send + Sync + Debug + Display {
    type Id: Copy + Eq + Hash + Serialize + DeserializeOwned + Send + Sync + Debug + Display;

    const TAG: Tag;
    const ID_IS_COMPLETE_ITEM: bool;

    fn id(&self) -> Self::Id;
}

A trait which allows an implementing type to be used by the gossiper and fetcher components, and furthermore allows generic network messages to include this type due to the provision of the type-identifying TAG.

Associated Types

type Id: Copy + Eq + Hash + Serialize + DeserializeOwned + Send + Sync + Debug + Display[src]

The type of ID of the item.

Loading content...

Associated Constants

const TAG: Tag[src]

The tag representing the type of the item.

const ID_IS_COMPLETE_ITEM: bool[src]

Whether the item’s ID is the complete item or not.

Loading content...

Required methods

fn id(&self) -> Self::Id[src]

The ID of the specific item.

Loading content...

Implementations on Foreign Types

impl Item for Trie<Key, StoredValue>[src]

type Id = Blake2bHash

Loading content...

Implementors

impl Item for Block[src]

type Id = BlockHash

impl Item for Deploy[src]

type Id = DeployHash

Loading content...