fn recv(&self, buf: &mut [u8]) -> Result<usize>;
fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr)>;
It is important for these to document that they only write to the buffer, not read from it, because that means it is safe to pass an uninitialized buffer. It would be wasteful to construct a buffer, initialize it to contain all 0 bytes, and pass it to UdpSocket.