pub struct SocketRecvResult {
pub bytes: usize,
pub address: Option<SocketAddress>,
pub truncated: bool,
pub control_truncated: bool,
}Expand description
Metadata from one receive. Only bytes bytes, spread across the buffers in order, were written; their initialized lengths remain unchanged.
Fields§
§bytes: usizeThe number of bytes written into the supplied buffers.
address: Option<SocketAddress>The sender when supplied by the OS, usually for datagrams. Stream receives may return None; use socket_peer_address for the connected peer.
truncated: boolA datagram exceeded the total buffer length. With nonzero capacity, remaining bytes were discarded unless this was a peek. Zero-capacity receive behavior is OS-specific. bytes is the copied length, not the original datagram length.
control_truncated: boolThe OS reported discarded ancillary data. This initial interface supplies no control buffer; ancillary data requires a separate capability.
Trait Implementations§
Source§impl Clone for SocketRecvResult
impl Clone for SocketRecvResult
impl Copy for SocketRecvResult
Source§impl Debug for SocketRecvResult
impl Debug for SocketRecvResult
impl Eq for SocketRecvResult
Source§impl PartialEq for SocketRecvResult
impl PartialEq for SocketRecvResult
impl StructuralPartialEq for SocketRecvResult
Auto Trait Implementations§
impl Freeze for SocketRecvResult
impl RefUnwindSafe for SocketRecvResult
impl Send for SocketRecvResult
impl Sync for SocketRecvResult
impl Unpin for SocketRecvResult
impl UnsafeUnpin for SocketRecvResult
impl UnwindSafe for SocketRecvResult
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