#[non_exhaustive]pub enum Header {
ClientHello(ClientHello),
ServerHello(ServerHello),
Connect(Connect),
Packet(Packet),
Dissociate(Dissociate),
Heartbeat(Heartbeat),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ClientHello(ClientHello)
ServerHello(ServerHello)
Connect(Connect)
Packet(Packet)
Dissociate(Dissociate)
Heartbeat(Heartbeat)
Implementations§
Source§impl Header
impl Header
pub const TYPE_CODE_CLIENT_HELLO: u8 = 0u8
pub const TYPE_CODE_SERVER_HELLO: u8 = 1u8
pub const TYPE_CODE_CONNECT: u8 = 2u8
pub const TYPE_CODE_PACKET: u8 = 3u8
pub const TYPE_CODE_DISSOCIATE: u8 = 4u8
pub const TYPE_CODE_HEARTBEAT: u8 = 5u8
Source§impl Header
impl Header
Source§impl Header
impl Header
Sourcepub async fn async_unmarshal(
s: &mut (impl AsyncRead + Unpin),
) -> Result<Self, UnmarshalError>
pub async fn async_unmarshal( s: &mut (impl AsyncRead + Unpin), ) -> Result<Self, UnmarshalError>
Unmarshals a header from an AsyncRead
stream
Sourcepub fn unmarshal(s: &mut impl Read) -> Result<Self, UnmarshalError>
pub fn unmarshal(s: &mut impl Read) -> Result<Self, UnmarshalError>
Unmarshals a header from a Read
stream
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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