aboutsummaryrefslogtreecommitdiff
path: root/net/src/endpoint.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-05-23 00:21:59 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-23 00:21:59 +0200
commit7be7f59d5caf38ca0cd7a12a937a2cfdca0268d7 (patch)
treee45a49f8ccbf099a4618e5e3fe981a5b1bf9c421 /net/src/endpoint.rs
parent2d1a8aea0b9330cd2eaad26eb187644adad6bed9 (diff)
p2p: add rpc server to monitor example
Diffstat (limited to 'net/src/endpoint.rs')
-rw-r--r--net/src/endpoint.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/src/endpoint.rs b/net/src/endpoint.rs
index 0c7ecd1..5aebdf9 100644
--- a/net/src/endpoint.rs
+++ b/net/src/endpoint.rs
@@ -238,6 +238,12 @@ impl ToEndpoint for String {
}
}
+impl ToEndpoint for Endpoint {
+ fn to_endpoint(&self) -> Result<Endpoint> {
+ Ok(self.clone())
+ }
+}
+
impl ToEndpoint for &str {
fn to_endpoint(&self) -> Result<Endpoint> {
Endpoint::from_str(self)