Struct libp2p::gossipsub::IdentityTransform
source · pub struct IdentityTransform;
Expand description
The default transform, the raw data is propagated as is to the application layer gossipsub.
Trait Implementations§
source§impl Clone for IdentityTransform
impl Clone for IdentityTransform
source§fn clone(&self) -> IdentityTransform
fn clone(&self) -> IdentityTransform
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl DataTransform for IdentityTransform
impl DataTransform for IdentityTransform
source§fn inbound_transform(
&self,
raw_message: RawGossipsubMessage
) -> Result<GossipsubMessage, Error>
fn inbound_transform(
&self,
raw_message: RawGossipsubMessage
) -> Result<GossipsubMessage, Error>
Takes a
RawGossipsubMessage
received and converts it to a GossipsubMessage
.source§fn outbound_transform(
&self,
_topic: &TopicHash,
data: Vec<u8, Global>
) -> Result<Vec<u8, Global>, Error>
fn outbound_transform(
&self,
_topic: &TopicHash,
data: Vec<u8, Global>
) -> Result<Vec<u8, Global>, Error>
Takes the data to be published (a topic and associated data) transforms the data. The
transformed data will then be used to create a
crate::RawGossipsubMessage
to be sent to peers. Read moresource§impl Default for IdentityTransform
impl Default for IdentityTransform
source§fn default() -> IdentityTransform
fn default() -> IdentityTransform
Returns the “default value” for a type. Read more