Skip to main content

valid_from

Function valid_from 

Source
pub fn valid_from(kind: ActionKind, state: &PrinterState) -> bool
Expand description

Whether one action is valid from the state the printer is in.

Acknowledging a failure, closing a print record and every spool command are valid from every state, because none of them changes anything at the machine; everything else names the states it makes sense from. Whether a close may go ahead turns on the job of the record’s own file rather than on the printer’s state, so it is read where the close is checked (crate::closing).