diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-25 13:33:00 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-25 13:33:00 +0100 |
commit | f228b6f98b141940a3302d4cd1978f56f5edb13e (patch) | |
tree | f0486d26f494ce7f5d507205aa5cd475d05385c1 /src/platform/tun.rs | |
parent | Make IO traits suitable for Tun events (up/down) (diff) | |
download | wireguard-rs-f228b6f98b141940a3302d4cd1978f56f5edb13e.tar.xz wireguard-rs-f228b6f98b141940a3302d4cd1978f56f5edb13e.zip |
Enable up/down from configuration interface
Diffstat (limited to 'src/platform/tun.rs')
-rw-r--r-- | src/platform/tun.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/tun.rs b/src/platform/tun.rs index fda17fd..801754e 100644 --- a/src/platform/tun.rs +++ b/src/platform/tun.rs @@ -51,11 +51,12 @@ pub trait Reader: Send + 'static { pub trait Tun: Send + Sync + 'static { type Writer: Writer; type Reader: Reader; - type Status: Status; type Error: Error; } /// On some platforms the application can create the TUN device itself. pub trait PlatformTun: Tun { + type Status: Status; + fn create(name: &str) -> Result<(Vec<Self::Reader>, Self::Writer, Self::Status), Self::Error>; } |