DatagramReceipt
Owns metadata for exactly one consumed UDP packet. Count is bytes copied into the supplied buffer. IsTruncated marks discarded unread tail; count is not the original packet size. Sender is an independent numeric endpoint. An empty packet has zero count and is not stream EOF. Immutable copied metadata retains neither buffer nor socket; readonly access is thread safe while this value is not replaced/moved.
Module std.net
import std.net;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
DatagramReceipt
pub struct DatagramReceiptOwns metadata for exactly one consumed UDP packet. Count is bytes copied into the supplied buffer. IsTruncated marks discarded unread tail; count is not the original packet size. Sender is an independent numeric endpoint. An empty packet has zero count and is not stream EOF. Immutable copied metadata retains neither buffer nor socket; readonly access is thread safe while this value is not replaced/moved.
DatagramReceipt.Count
pub Count: usize;Observes bytes actually copied, not original packet length. Return: Bounded copied prefix count, possibly zero.
DatagramReceipt.Sender
pub Sender: Endpoint;Copies the numeric sender without retaining the receiving socket. Return: Independent endpoint; no allocation, resolution or I/O.
DatagramReceipt.IsTruncated
pub IsTruncated: bool;Observes whether unread packet tail was consumed and discarded. Return: True for truncation; false includes a complete empty packet.