[−][src]Struct quiche::Header
A QUIC packet's header.
Fields
ty: Type
The type of the packet.
version: u32
The version of the packet.
dcid: Vec<u8>
The destination connection ID of the packet.
scid: Vec<u8>
The source connection ID of the packet.
odcid: Option<Vec<u8>>
The original destination connection ID. Only present in Retry
packets.
token: Option<Vec<u8>>
The address verification token of the packet. Only present in Initial
and Retry
packets.
versions: Option<Vec<u32>>
The list of versions in the packet. Only present in
VersionNegotiation
packets.
Methods
impl Header
[src]
pub fn from_slice(buf: &mut [u8], dcid_len: usize) -> Result<Header>
[src]
Parses a QUIC packet header from the given buffer.
The dcid_len
parameter is the length of the destination connection ID,
required to parse short header packets.
Examples:
let (len, src) = socket.recv_from(&mut buf).unwrap(); let hdr = quiche::Header::from_slice(&mut buf[..len], LOCAL_CONN_ID_LEN)?;
Trait Implementations
impl Clone for Header
[src]
impl Debug for Header
[src]
impl PartialEq<Header> for Header
[src]
impl StructuralPartialEq for Header
[src]
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,