We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f1b5f5 commit a503f8bCopy full SHA for a503f8b
src/client/connect/mod.rs
@@ -35,6 +35,15 @@ pub trait Connect: Send + Sync {
35
fn connect(&self, dst: Destination) -> Self::Future;
36
}
37
38
+impl<T: Connect + ?Sized> Connect for Box<T> {
39
+ type Transport = <T as Connect>::Transport;
40
+ type Error = <T as Connect>::Error;
41
+ type Future = <T as Connect>::Future;
42
+ fn connect(&self, dst: Destination) -> Self::Future {
43
+ <T as Connect>::connect(self, dst)
44
+ }
45
+}
46
+
47
/// A set of properties to describe where and how to try to connect.
48
///
49
/// This type is passed an argument for the [`Connect`](Connect) trait.
0 commit comments