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

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

    pub const TAG: Tag;
    pub const ID_IS_COMPLETE_ITEM: bool;

    pub 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

pub const TAG: Tag[src]

The tag representing the type of the item.

pub const ID_IS_COMPLETE_ITEM: bool[src]

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

Loading content...

Required methods

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

The ID of the specific item.

Loading content...

Implementors

impl Item for Block[src]

type Id = BlockHash

impl Item for Deploy[src]

type Id = DeployHash

Loading content...