Struct libp2p::gossipsub::protocol::GossipsubCodec [−][src]
Implementations
impl GossipsubCodec
[src]
pub fn new(
length_codec: UviBytes<Bytes>,
validation_mode: ValidationMode
) -> GossipsubCodec
[src]
length_codec: UviBytes<Bytes>,
validation_mode: ValidationMode
) -> GossipsubCodec
Trait Implementations
impl Decoder for GossipsubCodec
[src]
type Item = GossipsubRpc
The type of items returned by decode
type Error = Error
The type of decoding errors.
pub fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<<GossipsubCodec as Decoder>::Item>, <GossipsubCodec as Decoder>::Error>
[src]
&mut self,
src: &mut BytesMut
) -> Result<Option<<GossipsubCodec as Decoder>::Item>, <GossipsubCodec as Decoder>::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>
impl Encoder for GossipsubCodec
[src]
type Item = GossipsubRpc
The type of items consumed by encode
type Error = Error
The type of encoding errors.
pub fn encode(
&mut self,
item: <GossipsubCodec as Encoder>::Item,
dst: &mut BytesMut
) -> Result<(), <GossipsubCodec as Encoder>::Error>
[src]
&mut self,
item: <GossipsubCodec as Encoder>::Item,
dst: &mut BytesMut
) -> Result<(), <GossipsubCodec as Encoder>::Error>
Auto Trait Implementations
impl RefUnwindSafe for GossipsubCodec
impl Send for GossipsubCodec
impl Sync for GossipsubCodec
impl Unpin for GossipsubCodec
impl UnwindSafe for GossipsubCodec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,