Skip to main content

Module wire

Module wire 

Source
Expand description

The JSON a caller sends and the JSON this server answers with.

Nothing here restates a contract type. A request carries the values one [PrintAction] variant needs and this module assembles the action; an answer carries the contract’s own records as they are. In particular no answer carries image bytes: ImageAnswer carries the record and the absolute path its bytes are at, because the server, the command-line program and the agent all run on the one host and image transport is a filesystem path.

Structs§

ActionAnswer
What one mutating request left behind it.
ActionBody
One request for one action of the vocabulary.
BedClearAnswer
What recording the operator’s word that the bed is clear answers: the event it was recorded as, which every recovery decided on it names.
BedClearBody
One request recording the operator’s word that the bed is clear.
BodyRefusal
Why a request could not be turned into one action of the vocabulary.
ContextAnswer
What a context read answers.
ErrorAnswer
What this server answers when it will not do what it was asked.
EventsAnswer
What an events read answers: the events stored after its cursor that pass its filters, oldest first, and where the next read picks up.
HistoryAnswer
What a history read answers.
ImageAnswer
What an image read answers.
IngressAnswer
What the ingress answers a post it accepted.
ManifestAnswer
What a manifest read or write answers.
ManifestBody
One request to replace a print’s manifest.
PreflightAnswer
What a filament check answers.
PrintEnded
One print’s end, as its print_ended event stored it.
PrintsAnswer
What the prints read answers: every print, and the one the printer is running.
RecoveryAnswer
What a recovery action answers, carried out or refused.
SpoolAnswer
What one spool’s read answers: the spool, and the newest of the printer’s own events that name it.
SpoolCommandAnswer
What a spool command answers, accepted or refused.
SpoolsAnswer
What the spools read answers.
StatusAnswer
What a status read answers.
TimelineAnswer
What a printer history read answers: one page of the printer’s own events.

Functions§

at_a_glance
One spool, in one line: its name, its material, what is left of what it held, where it is, whether its figure can be trusted, and whether it is retired.
claimed_actor
The actor a spool command’s body claims, read before anything else of it, so the claim is held to the caller before the body is ruled on.
reason_of
The reason a mutating request carries, refused when it carries none.
recovery_of
The recovery action one request asks for, assembled from its body.
spool_command_of
The spool command one request asks for, assembled from its body.

Type Aliases§

LookAnswer
What a fresh look answers: the look, as the supervision core took it.
RecoveryStatusAnswer
What the recovery read answers: everything a recovery is checked against now, as the supervision core reads it.