#[non_exhaustive]pub struct PathStats {
pub rtt: Duration,
pub cwnd: u64,
pub congestion_events: u64,
pub lost_packets: u64,
pub lost_bytes: u64,
pub sent_packets: u64,
pub sent_plpmtud_probes: u64,
pub lost_plpmtud_probes: u64,
pub black_holes_detected: u64,
pub current_mtu: u16,
}展开描述
与某条传输路径相关的统计信息
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
非穷尽结构体将来可能添加额外的字段。因此,外部 crate 不能使用传统的
Struct { .. } 语法构造非穷尽结构体;进行模式匹配时必须包含通配 ..;结构体更新语法也无法使用。rtt: Duration该连接延迟(往返时间)的当前最佳估计值
cwnd: u64该连接当前的拥塞窗口
congestion_events: u64该连接上发生的拥塞事件数
lost_packets: u64在该路径上丢失的数据包数量
lost_bytes: u64在该路径上丢失的字节数
sent_packets: u64在该路径上发送的数据包数量
sent_plpmtud_probes: u64在该路径上发送的 PLPMTUD 探测包数量(也计入 sent_packets)
lost_plpmtud_probes: u64在该路径上丢失的 PLPMTUD 探测包数量(不计入 lost_packets 与 lost_bytes)
black_holes_detected: u64在该路径上检测到“黑洞”的次数
current_mtu: u16该路径当前支持的最大 UDP 有效负载大小
trait 实现§
impl Copy for PathStats
自动 trait 实现§
impl Freeze for PathStats
impl RefUnwindSafe for PathStats
impl Send for PathStats
impl Sync for PathStats
impl Unpin for PathStats
impl UnsafeUnpin for PathStats
impl UnwindSafe for PathStats
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. 更多信息