From e7e7a5a1f768ae06e5203551236df32a08ba7f9e Mon Sep 17 00:00:00 2001 From: 0rphon <59403052+0rphon@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:40:43 -0800 Subject: [PATCH] make reader/writer public --- src/platform/mod.rs | 4 +++- src/platform/windows/mod.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 9973d928..70130628 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -16,6 +16,8 @@ #[cfg(unix)] pub(crate) mod posix; +#[cfg(unix)] +pub use posix::{Reader, Writer}; #[cfg(target_os = "linux")] pub(crate) mod linux; @@ -48,7 +50,7 @@ pub use crate::platform::posix::Tun; #[cfg(target_os = "windows")] pub(crate) mod windows; #[cfg(target_os = "windows")] -pub use self::windows::{create, Device, PlatformConfig, Tun}; +pub use self::windows::{create, Device, PlatformConfig, Reader, Tun, Writer}; #[cfg(test)] mod test { diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index 7be864f0..dbcdd38b 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -20,7 +20,7 @@ use crate::configuration::Configuration; use crate::error::Result; #[cfg(feature = "async")] pub use device::Driver; -pub use device::{Device, Tun}; +pub use device::{Device, Reader, Tun, Writer}; use std::ffi::OsString; /// Windows-only interface configuration.