pub struct Packet { /* private fields */ }Expand description
One receive: a possibly GRO-coalesced run of datagrams from one source.
Borrows its worker’s receive pool; drop it to hand the space back. The
payload is stride-sized datagrams, the last possibly short.
Implementations§
Source§impl Packet
impl Packet
Sourcepub fn from(&self) -> SocketAddr
pub fn from(&self) -> SocketAddr
The datagrams’ source address.
Sourcepub fn ecn(&self) -> Option<Ecn>
pub fn ecn(&self) -> Option<Ecn>
The ECN codepoint the datagrams arrived with; GRO only coalesces datagrams that share one.
Sourcepub fn stride(&self) -> usize
pub fn stride(&self) -> usize
The datagram size GRO coalesced with; the final datagram may be short.
Sourcepub fn payload_mut(&mut self) -> &mut [u8] ⓘ
pub fn payload_mut(&mut self) -> &mut [u8] ⓘ
The whole coalesced payload, mutably (QUIC decrypts in place).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Packet
impl !Send for Packet
impl !Sync for Packet
impl !UnwindSafe for Packet
impl Freeze for Packet
impl Unpin for Packet
impl UnsafeUnpin for Packet
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