printobserver-printer-api.
Owns: the port the physical printer speaks through — the trait for reading
printer and job state and for asking the machine to do one of the bounded
things the action vocabulary names, plus that port's own error type — and
the printer domain's vocabulary: the state a printer reports ([state]),
the closed set of things an adjustment may change ([adjustable]), the
snapshots those reads answer ([snapshot]) and the plausibility ranges
their reported numbers are read against ([ranges]). A change to what a
printer reports edits this crate and the adapters behind it, and nothing
central.
May depend on: printobserver-types only. A port that named an
implementation would stop being a port.
What this port does not expose
There is no method that accepts a command string, and that absence is the
contract rather than an omission: no method here admits a byte sequence at
all, and the only string anywhere in the closure reachable from a method's
parameters is the one [FileName] wraps, which exactly one method —
[PrinterPort::start] — takes. Every value a method takes is already
bounded by the time it arrives: policy has ruled on it before it gets here.
Why the methods answer a boxed future
Every method is asynchronous, and the trait is dyn-compatible and shareable
across threads, because the supervision core holds every port behind
Arc<dyn Port>. An async fn in a trait is not dyn-compatible, so each
method answers a [BoxFuture] instead: the same asynchrony, in the one
shape a trait object can carry.