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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//! What a printer pushes on its own, and the closed set of commands it may be
//! sent.
//!
//! A poll reads the printer's state; some of what matters never shows in one.
//! A firmware reset that lands the machine idle reads exactly like a cancel,
//! and a reset while idle changes nothing a read reports at all. The printer's
//! own push channel says so, and [`PrinterPush`] is that channel's vocabulary
//! here: what [`PrinterPort::push_events`](crate::PrinterPort::push_events)
//! answers.
//!
//! [`PrinterCommand`] is the other direction: the only commands
//! [`PrinterPort::send_command`](crate::PrinterPort::send_command) takes. It is
//! a closed vocabulary rather than a line, so nothing a caller writes reaches a
//! machine through it; each adapter renders a variant to its own line.
//! [`AxisPosition`] is what
//! [`PrinterPort::read_position`](crate::PrinterPort::read_position) answers.
use Pin;
use ;
/// A stream of values that arrive one at a time, asynchronously.
///
/// The one shape [`PrinterPort::push_events`](crate::PrinterPort::push_events)
/// answers in, declared here so that this port depends on nothing but the type
/// crate. It is the same contract as the ecosystem's own `Stream`: `Ready(None)`
/// is the end, after which nothing more arrives.
/// A stream this port answers, in the one shape a trait object can carry.
pub type BoxStream<'a, T> = ;
/// One thing a printer pushed on its own.
/// What kind of error a printer pushed.
/// A command a printer may be sent: a closed vocabulary, each variant rendered
/// by the adapter to its own line.
///
/// Every number a variant carries is a distance or a place in millimetres that
/// policy has already ruled on; no variant carries text.
/// Which axes a [`PrinterCommand::Home`] homes.
/// Where the print head is, in millimetres, as the printer reported it.