pub enum SpoolRefusalCause {
UnknownSpool {
spool_id: SpoolId,
},
RetiredSpool {
spool_id: SpoolId,
},
NothingToConfirm {
tool: i64,
},
InvalidAdjustmentFigure {
field: SpoolField,
value: f64,
},
TareRequired {
spool_id: SpoolId,
},
DensityRequired {
material: String,
spool_id: Option<SpoolId>,
},
MissingField {
field: SpoolField,
},
ConflictingFields {
fields: Vec<SpoolField>,
},
UnknownTool {
tool: i64,
},
NotLoaded {
spool_id: SpoolId,
},
LedgerRefused,
}Expand description
Why the spool ledger refused a command, each cause carrying what a client needs to choose the next valid request.
Variants§
UnknownSpool
No spool was ever registered under this identifier.
RetiredSpool
The spool is retired, and takes no further command.
NothingToConfirm
The spool named is already on the tool, and nothing is pending there or marked on it for a load to confirm.
InvalidAdjustmentFigure
A figure the command gave is not one the field can hold: not a number, or out of the field’s range.
Fields
field: SpoolFieldThe field the figure was given for.
TareRequired
A scale reading was given for a spool with no tare, so it cannot be turned into a figure.
DensityRequired
The material has no known density, so the command needs one.
Fields
MissingField
A field the command needs was empty or absent.
Fields
field: SpoolFieldThe field; for a correction naming neither figure, remaining_g,
which gross_g may stand in for.
ConflictingFields
The command gave fields only one of which it may carry.
Fields
fields: Vec<SpoolField>Every field given that conflicts, in the command’s own order.
UnknownTool
The command named a tool the printer cannot have.
NotLoaded
The spool is loaded on no tool, so there is nothing to unload.
LedgerRefused
The ledger refused the write the command made, because the spools changed under it; reading them again shows how.