pub struct Transmit<'a> {
pub peer: SocketAddr,
pub data: &'a [u8],
pub segment_size: usize,
pub ecn: u8,
pub src_ip: Option<IpAddr>,
}Expand description
One datagram (or, with segment_size, a GSO batch of datagrams) to send.
Fields§
§peer: SocketAddrThe destination.
data: &'a [u8]The payload. With segment_size set it is cut into datagrams of that size by the
kernel (Linux GSO, Windows USO); elsewhere this module cuts it itself.
segment_size: usizeSegment size for GSO, or 0 for one datagram.
ecn: u8ECN bits to set (0..=3).
src_ip: Option<IpAddr>Source address to send from (multi-homed hosts), when packet info is on.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for Transmit<'a>
impl<'a> Freeze for Transmit<'a>
impl<'a> Move for Transmit<'a>
impl<'a> RefUnwindSafe for Transmit<'a>
impl<'a> Send for Transmit<'a>
impl<'a> Sync for Transmit<'a>
impl<'a> Unpin for Transmit<'a>
impl<'a> UnsafeUnpin for Transmit<'a>
impl<'a> UnwindSafe for Transmit<'a>
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