1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Runtime-neutral asynchronous transport contract.
use Future;
use ;
/// Asynchronous transport over caller-owned request and response buffers.
///
/// The contract does not select an executor, allocator, HTTP client, TLS
/// implementation, clock, or retry policy. Adapter crates document any runtime
/// requirements they add.
///
/// The shared receiver does not create concurrency. Callers may overlap or
/// spawn returned futures only when the concrete implementation and future
/// satisfy their executor's `Sync`, `Send`, and lifetime requirements.
///
/// Implementations must treat cancellation as an error path: dropping the
/// returned future must not expose a partially initialized response as a
/// successful response. Implementations handling secret response
/// data should also clear temporary owned storage when the future is dropped.