logo
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;
}
Expand description

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.

Required Associated Types

The type of ID of the item.

Required Associated Constants

The tag representing the type of the item.

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

Required Methods

The ID of the specific item.

Implementations on Foreign Types

Implementors