pub struct DecisionInput<'a> {
pub action: &'a PrintAction,
pub actor: &'a Actor,
pub requested_at: Timestamp,
pub print: Option<&'a PrintRecord>,
pub printer_state: Option<&'a PrinterState>,
pub bounds: &'a EffectiveBounds,
pub envelope: &'a SafetyEnvelope,
pub since_last_agent_action: Option<Duration>,
}Expand description
Everything one decision is taken from.
Fields§
§action: &'a PrintActionWhat is being asked for.
actor: &'a ActorWho is asking.
requested_at: TimestampWhen they asked.
print: Option<&'a PrintRecord>The print it is being asked against, when there is one.
printer_state: Option<&'a PrinterState>The state to judge this request from, when there is one to judge it from.
Absent means the state check does not apply: either no snapshot could be taken, or the request is a restoration, which is the closing half of a change this policy already accepted rather than a fresh request for a machine change — the state that justified the original check is by definition the state that has just ended. The bounds check applies to a restoration exactly as it does to the request that opened it.
bounds: &'a EffectiveBoundsThe bounds in force for this print.
envelope: &'a SafetyEnvelopeThe operator’s safety envelope.
since_last_agent_action: Option<Duration>How long ago the agent last changed the machine on this print, if it
has, measured on Clock::elapsed — time
passing rather than the wall clock moving, so that a host’s time
synchronisation stepping the wall clock neither lets the agent act again
early nor holds it back longer than the interval.