pub struct RecvMeta {
pub addr: SocketAddr,
pub len: usize,
pub stride: usize,
pub ecn: Option<EcnCodepoint>,
pub dst_ip: Option<IpAddr>,
}Expand description
What one UdpDatagrams::poll_recv slot received.
Fields§
§addr: SocketAddr§len: usizeBytes written into the corresponding buffer.
stride: usizeThe size of a single datagram inside that buffer when GRO coalesced
several. 0, or any value >= len, means “one datagram”.
ecn: Option<EcnCodepoint>The ECN codepoint the datagram(s) arrived with.
None when unknown, never a guess. This is the one field in the
module where a plausible-looking substitute would do real damage: a
receiver that invented Ect0 would feed a congestion controller
evidence of a marking that never happened, and the controller cannot
tell that apart from the real thing. Under-reporting costs the
controller an optimisation; over-reporting costs it its correctness.
dst_ip: Option<IpAddr>The destination address encoded in the datagram, where the platform reports it.
Trait Implementations§
impl Copy for RecvMeta
impl Eq for RecvMeta
impl StructuralPartialEq for RecvMeta
Auto Trait Implementations§
impl Freeze for RecvMeta
impl RefUnwindSafe for RecvMeta
impl Send for RecvMeta
impl Sync for RecvMeta
impl Unpin for RecvMeta
impl UnsafeUnpin for RecvMeta
impl UnwindSafe for RecvMeta
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