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 5400295 commit 694e46dCopy full SHA for 694e46d
examples/single_threaded.rs
@@ -1,5 +1,15 @@
1
#![deny(warnings)]
2
-
+/// This example shows how to use hyper with a single-threaded runtime.
3
+/// This example exists also to test if the code compiles when `Body` is not `Send`.
4
+///
5
+/// This Example includes HTTP/1 and HTTP/2 server and client.
6
7
+/// In HTTP/1 it is possible to use a `!Send` `Body`type.
8
+/// In HTTP/2 it is possible to use a `!Send` `Body` and `IO` type.
9
10
+/// The `Body` and `IOTypeNotSend` structs in this example are `!Send`
11
12
+/// For HTTP/2 this only works if the `Executor` trait is implemented without the `Send` bound.
13
use http_body_util::BodyExt;
14
use hyper::server::conn::http2;
15
use std::cell::Cell;
0 commit comments