Enum litep2p::codec::ProtocolCodec
source · pub enum ProtocolCodec {
Identity(usize),
UnsignedVarint(Option<usize>),
Unspecified,
}
Expand description
Supported protocol codecs.
Variants§
Identity(usize)
Identity codec where the argument denotes the payload size.
UnsignedVarint(Option<usize>)
Unsigned varint where the argument denotes the maximum message size, if specified.
Unspecified
Protocol doens’t need framing for its messages or is using a custom codec.
Trait Implementations§
source§impl Clone for ProtocolCodec
impl Clone for ProtocolCodec
source§fn clone(&self) -> ProtocolCodec
fn clone(&self) -> ProtocolCodec
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 Debug for ProtocolCodec
impl Debug for ProtocolCodec
impl Copy for ProtocolCodec
Auto Trait Implementations§
impl Freeze for ProtocolCodec
impl RefUnwindSafe for ProtocolCodec
impl Send for ProtocolCodec
impl Sync for ProtocolCodec
impl Unpin for ProtocolCodec
impl UnwindSafe for ProtocolCodec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)