Trait fuel_core_p2p::codecs::GossipsubCodec
source · pub trait GossipsubCodec {
type RequestMessage;
type ResponseMessage;
// Required methods
fn encode(&self, data: Self::RequestMessage) -> Result<Vec<u8>, Error>;
fn decode(
&self,
encoded_data: &[u8],
gossipsub_topic: GossipTopicTag,
) -> Result<Self::ResponseMessage, Error>;
}
Expand description
Implement this in order to handle serialization & deserialization of Gossipsub messages