aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform/mod.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-10-16 13:40:40 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-10-16 13:40:40 +0200
commit2f3ceab0364497a4a6cf866b505f74443ed6e3ae (patch)
tree5ed11473dc4b4d6f265fc739c0600db972a28ed5 /src/platform/mod.rs
parentWork on Linux platform code (diff)
downloadwireguard-rs-2f3ceab0364497a4a6cf866b505f74443ed6e3ae.tar.xz
wireguard-rs-2f3ceab0364497a4a6cf866b505f74443ed6e3ae.zip
Work on porting timer semantics and linux platform
Diffstat (limited to '')
-rw-r--r--src/platform/mod.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/platform/mod.rs b/src/platform/mod.rs
index e83384c..de33714 100644
--- a/src/platform/mod.rs
+++ b/src/platform/mod.rs
@@ -9,26 +9,12 @@ mod linux;
#[cfg(target_os = "linux")]
pub use linux::PlatformTun;
-/* Syntax is nasty here, due to open issue:
- * https://github.com/rust-lang/rust/issues/38078
- */
-pub trait UDPBind {
+pub trait UDPBind: Bind {
type Closer;
- type Error: Error;
- type Bind: Bind;
/// Bind to a new port, returning the reader/writer and
/// an associated instance of the Closer type, which closes the UDP socket upon "drop".
- fn bind(
- port: u16,
- ) -> Result<
- (
- <<Self as UDPBind>::Bind as Bind>::Reader,
- <<Self as UDPBind>::Bind as Bind>::Writer,
- Self::Closer,
- ),
- Self::Error,
- >;
+ fn bind(port: u16) -> Result<(Self::Reader, Self::Writer, Self::Closer), Self::Error>;
}
pub trait TunBind: Tun {