summaryrefslogtreecommitdiffstats
path: root/src/types/endpoint.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-09-15 15:15:15 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-09-15 15:15:15 +0200
commitf46762183a5fad4aba88379714abf1d21c3e1c54 (patch)
treec1d6070a4cd356ea24ac2e7ba7ba88896c54799c /src/types/endpoint.rs
parentBegin work on the pure Wireguard implemenation (diff)
downloadwireguard-rs-f46762183a5fad4aba88379714abf1d21c3e1c54.tar.xz
wireguard-rs-f46762183a5fad4aba88379714abf1d21c3e1c54.zip
Sent staged packets when key-pair confirmed
Diffstat (limited to '')
-rw-r--r--src/types/endpoint.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/types/endpoint.rs b/src/types/endpoint.rs
index 02682a9..261203f 100644
--- a/src/types/endpoint.rs
+++ b/src/types/endpoint.rs
@@ -1,5 +1,6 @@
use std::net::SocketAddr;
-pub trait Endpoint: Into<SocketAddr> + From<SocketAddr> + Copy + Send {}
-
-impl<T> Endpoint for T where T: Into<SocketAddr> + From<SocketAddr> + Copy + Send {}
+pub trait Endpoint: Send {
+ fn from_address(addr: SocketAddr) -> Self;
+ fn into_address(&self) -> SocketAddr;
+}