#[repr(C)]pub struct Header {
pub first: u8,
pub version: Option<u32>,
pub destination_cid: Bytes,
pub source_cid: Option<Bytes>,
pub supported_versions: Option<Bytes>,
pub ext: Option<HeaderExt>,
}
Expand description
A QUIC packet header structure, as close as it is encoded on the wire.
Fields§
§first: u8
The first byte of the header, defining its type + version-specific bits.
version: Option<u32>
The version contained in the header, if any. Is 0 for version negotiation packets.
destination_cid: Bytes
The destination connection ID. A 0-length connection ID is Some of an empty Vec.
source_cid: Option<Bytes>
The source connection ID. A 0-length connection ID is Some of an empty Vec, absence of source connection ID is None.
supported_versions: Option<Bytes>
Supported version, only present in a Version Negotiation packet. Should represents a
Vec<u32>
.
ext: Option<HeaderExt>
Additional fields that are not guaranteed to stay in the invariants. The host implementation may provide some information here for received packets, but it is not mandatory. All fields being part of the header but requiring decryption are put there. Hence, prior to decryption process, this field may contain meaningless information. The main use of this field is for the sending of packets.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Header, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Header, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialOrd for Header
impl PartialOrd for Header
Source§impl Serialize for Header
impl Serialize for Header
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for Header
impl Eq for Header
impl StructuralPartialEq for Header
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.