pub enum ExtendedMessage<ByteBuf: ByteBufT> {
Handshake(ExtendedHandshake<ByteBuf>),
UtMetadata(UtMetadata<ByteBuf>),
UtPex(UtPex<ByteBuf>),
Dyn(u8, BencodeValue<ByteBuf>),
}Variants§
Handshake(ExtendedHandshake<ByteBuf>)
UtMetadata(UtMetadata<ByteBuf>)
UtPex(UtPex<ByteBuf>)
Dyn(u8, BencodeValue<ByteBuf>)
Implementations§
Source§impl<'a> ExtendedMessage<ByteBuf<'a>>
impl<'a> ExtendedMessage<ByteBuf<'a>>
pub fn serialize( &self, out: &mut [u8], peer_extended_msg_ids: &dyn Fn() -> PeerExtendedMessageIds, ) -> Result<usize, SerializeError>
pub fn deserialize( buf: DoubleBufHelper<'a>, ) -> Result<Self, MessageDeserializeError>
Trait Implementations§
impl<ByteBuf: Eq + ByteBufT> Eq for ExtendedMessage<ByteBuf>
impl<ByteBuf: PartialEq + ByteBufT> StructuralPartialEq for ExtendedMessage<ByteBuf>
Auto Trait Implementations§
impl<ByteBuf> Freeze for ExtendedMessage<ByteBuf>where
ByteBuf: Freeze,
impl<ByteBuf> RefUnwindSafe for ExtendedMessage<ByteBuf>where
ByteBuf: RefUnwindSafe,
impl<ByteBuf> Send for ExtendedMessage<ByteBuf>where
ByteBuf: Send,
impl<ByteBuf> Sync for ExtendedMessage<ByteBuf>where
ByteBuf: Sync,
impl<ByteBuf> Unpin for ExtendedMessage<ByteBuf>where
ByteBuf: Unpin,
impl<ByteBuf> UnsafeUnpin for ExtendedMessage<ByteBuf>where
ByteBuf: UnsafeUnpin,
impl<ByteBuf> UnwindSafe for ExtendedMessage<ByteBuf>where
ByteBuf: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more