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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! The transport seam: one request document in, one reply document out.
use Value;
use TrustTask;
use crateTrqlError;
/// Which wire a [`TrqlTransport`] speaks.
///
/// Kept as an explicit tag (never inferred from endpoint shape — a TSP VID is
/// a DID too) so callers and logs can always name the protocol in use.
/// A pipe that carries one Trust Task request and returns the peer's reply
/// document — either the `#response` success document or a `trust-task-error`
/// document. Interpretation of the reply (correlation, error mapping, payload
/// typing) belongs to [`crate::TrqlClient`], so bindings cannot diverge on
/// semantics.
///
/// Contract for implementations:
///
/// * The request's `recipient` is the destination party; transports that
/// route by DID read it from there.
/// * Every exchange has a finite wait: a peer that never answers is a
/// [`TrqlError::Timeout`], never a hang.
/// * A reply body that is not a Trust Task document is a
/// [`TrqlError::Contract`] (2xx / delivered) or [`TrqlError::Transport`]
/// (error status with a non-Trust-Task body) — never silently dropped.