pub struct Transmit {
pub destination: SocketAddr,
pub ecn: Option<EcnCodepoint>,
pub size: usize,
pub segment_size: Option<usize>,
pub src_ip: Option<IpAddr>,
}展开描述
一个出站数据包
字段§
§destination: SocketAddr该数据报应发送到的套接字
ecn: Option<EcnCodepoint>在该包上设置的显式拥塞通知位
size: usize已写入调用方提供的缓冲区的数据量
segment_size: Option<usize>若本次传输包含多个数据报,则为分段大小。若本次传输仅包含单个数据报,则为 None。
src_ip: Option<IpAddr>该数据报的可选源 IP 地址
trait 实现§
自动 trait 实现§
impl Freeze for Transmit
impl RefUnwindSafe for Transmit
impl Send for Transmit
impl Sync for Transmit
impl Unpin for Transmit
impl UnsafeUnpin for Transmit
impl UnwindSafe for Transmit
blanket 实现§
源代码§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
源代码§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. 更多信息