Struct libp2p_gossipsub::protocol::GossipsubCodec [−][src]
pub struct GossipsubCodec { /* fields omitted */ }Implementations
impl GossipsubCodec[src]
impl GossipsubCodec[src]pub fn new(length_codec: UviBytes, validation_mode: ValidationMode) -> Self[src]
Trait Implementations
impl Decoder for GossipsubCodec[src]
impl Decoder for GossipsubCodec[src]type Item = HandlerEvent
The type of items returned by decode
type Error = GossipsubHandlerError
The type of decoding errors.
fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>[src]
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
pub fn decode_eof(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>[src]
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>