Struct libp2p::gossipsub::protocol::GossipsubCodec [−][src]
pub struct GossipsubCodec { /* fields omitted */ }Implementations
Trait Implementations
type Item = HandlerEvent
type Item = HandlerEventThe type of items returned by decode
type Error = GossipsubHandlerError
type Error = GossipsubHandlerErrorThe type of decoding errors.
pub fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<<GossipsubCodec as Decoder>::Item>, <GossipsubCodec as Decoder>::Error>[src]
pub fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<<GossipsubCodec as Decoder>::Item>, <GossipsubCodec as Decoder>::Error>[src]Decode an item from the src BytesMut into an item
fn decode_eof(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn decode_eof(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>Called when the input stream reaches EOF, signaling a last attempt to decode Read more
type Item = Rpc
type Item = RpcThe type of items consumed by encode
type Error = GossipsubHandlerError
type Error = GossipsubHandlerErrorThe type of encoding errors.
pub fn encode(
&mut self,
item: <GossipsubCodec as Encoder>::Item,
dst: &mut BytesMut
) -> Result<(), <GossipsubCodec as Encoder>::Error>[src]
pub fn encode(
&mut self,
item: <GossipsubCodec as Encoder>::Item,
dst: &mut BytesMut
) -> Result<(), <GossipsubCodec as Encoder>::Error>[src]Encodes an item into the BytesMut provided by dst.
Auto Trait Implementations
impl RefUnwindSafe for GossipsubCodecimpl Send for GossipsubCodecimpl Sync for GossipsubCodecimpl Unpin for GossipsubCodecimpl UnwindSafe for GossipsubCodec