pub trait PollHeader {
type Error;
type Packet;
// Required methods
fn new_with(hd: u8, remaining_len: u32) -> Result<Self, Self::Error>
where Self: Sized;
fn build_empty_packet(&self) -> Option<Self::Packet>;
fn block_decode(
self,
reader: &mut &[u8],
) -> Result<Self::Packet, Self::Error>;
fn remaining_len(&self) -> usize;
fn is_eof_error(err: &Self::Error) -> bool;
}
Required Associated Types§
Required Methods§
fn new_with(hd: u8, remaining_len: u32) -> Result<Self, Self::Error>where
Self: Sized,
Sourcefn build_empty_packet(&self) -> Option<Self::Packet>
fn build_empty_packet(&self) -> Option<Self::Packet>
Packet without body is empty packet
fn block_decode(self, reader: &mut &[u8]) -> Result<Self::Packet, Self::Error>
fn remaining_len(&self) -> usize
fn is_eof_error(err: &Self::Error) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.