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 2e8d6e1 commit e3cba47Copy full SHA for e3cba47
src/api/tls.rs
@@ -39,6 +39,27 @@ where
39
})
40
}
41
42
+trait Func: Fn() -> <Self as Func>::Output {
43
+ type Output;
44
+}
45
+
46
+impl<F, O> Func for F
47
+where
48
+ F: Fn() -> O,
49
+{
50
+ type Output = O;
51
52
53
+fn _test<F: CertFacade>(_facade: F) -> impl Func<Output = impl Future<Output = ()>> + Clone {
54
+ let test = Arc::new("Hallo".to_owned());
55
+ move || {
56
+ let test_two = Arc::clone(&test);
57
+ async move {
58
+ println!("{}", test_two);
59
+ }
60
61
62
63
struct Acceptor<F> {
64
facade: F,
65
config: RwLock<(Option<Cert>, Arc<ServerConfig>)>,
0 commit comments