Skip to main content

Module push

Module push 

Source
Expand description

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 answers.

PrinterCommand is the other direction: the only commands 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.

Enums§

PrinterCommand
A command a printer may be sent: a closed vocabulary, each variant rendered by the adapter to its own line.
PrinterErrorReason
What kind of error a printer pushed.
PrinterPush
One thing a printer pushed on its own.

Traits§

Stream
A stream of values that arrive one at a time, asynchronously.

Type Aliases§

BoxStream
A stream this port answers, in the one shape a trait object can carry.