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
55
//! Declare a "command checker" trait that checks whether a given relay message
//! is acceptable on a given stream.
use UnparsedRelayMsg;
use crateResult;
/// A value returned by CmdChecker on success.
pub
/// An object that checks incoming commands before they are sent to a stream.
///
/// These checks are called from the circuit reactor code, which runs in its own
/// task. The reactor code continues calling these checks we have sent our own
/// END cell on the stream. See `crate::client::circuit::halfstream` for more
/// information.
///
/// NOTE: The checking DOES NOT take SENDME/XON/XOFF messages into account; those are
/// handled separately. Neither of the methods on this trait will ever be
/// passed a SENDME/XON/XOFF message.
///
/// See [`circuit::reactor`](crate::client::reactor) for more information on
/// how these checks relate to other checks performed on incoming messages.
pub
/// Type alias for a CmdChecker of unspecified type.
//
// TODO: Someday we might turn this into an enum if we decide it's beneficial.
pub type AnyCmdChecker = ;