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.
2 parents 2a89da2 + 45e54df commit 3594a2aCopy full SHA for 3594a2a
src/upgrade/connection.rs
@@ -9,6 +9,12 @@ pub struct RawConnection<Inner> {
9
inner: Inner,
10
}
11
12
+impl Connection {
13
+ pub fn new<T: InnerConnection + 'static>(t: T) -> Self {
14
+ RawConnection { inner: Box::new(t) }
15
+ }
16
+}
17
+
18
/// A boxed upgraded HTTP connection.
19
pub type Connection = RawConnection<Box<dyn InnerConnection + 'static>>;
20
0 commit comments