heim_net/os/
windows.rs

1//! Windows-specific extensions.
2//!
3//! Available only for `cfg(target_os = "windows")`
4
5/// Windows-specific extension for [IoCounters].
6///
7/// [IoCounters]: ../../struct.IoCounters.html
8pub trait IoCountersExt {
9    /// Returns packets amount which were dropped while sending them.
10    fn drop_sent(&self) -> u64;
11}
12
13#[cfg(target_os = "windows")]
14impl IoCountersExt for crate::IoCounters {
15    fn drop_sent(&self) -> u64 {
16        self.as_ref().drop_sent()
17    }
18}