use std::{
fmt::{Debug, Display},
hash::Hash,
};
use serde::{de::DeserializeOwned, Serialize};
use crate::effect::GossipTarget;
pub(crate) trait GossipItem:
Clone + Serialize + DeserializeOwned + Send + Sync + Debug + Display + Eq
{
type Id: Clone + Eq + Hash + Serialize + DeserializeOwned + Send + Sync + Debug + Display;
const ID_IS_COMPLETE_ITEM: bool;
const REQUIRES_GOSSIP_RECEIVED_ANNOUNCEMENT: bool;
fn gossip_id(&self) -> Self::Id;
fn gossip_target(&self) -> GossipTarget;
}
pub(crate) trait LargeGossipItem: GossipItem {}
pub(crate) trait SmallGossipItem: GossipItem {
fn id_as_item(id: &Self::Id) -> &Self;
}