Skip to main content

Module client

Module client 

Source
Expand description

LAN MQTT client — the I/O layer.

One-shot, stateless cycle (connect → pushall → collect snapshot → disconnect), which suits a CLI invocation and respects the A1/P1 single-MQTT- connection limit. Built on rumqttc + rustls; the printer presents a self-signed certificate with no CA chain, so we accept any certificate while still validating the TLS handshake signatures.

StatusSource abstracts snapshot fetching so consumers (and tests) don’t depend on the concrete MQTT client.

Re-exports§

pub use crate::core::session::CommandOutcome;
pub use crate::core::session::VerifyStage;

Structs§

LanMqttClient
A one-shot LAN MQTT client.

Enums§

ClientError
Errors from the I/O client. Messages never include the access code.
WatchStep
Whether LanMqttClient::watch should keep watching or stop.

Traits§

StatusSource
Something that can produce a printer status snapshot. Abstracted so the CLI and tests don’t depend on the concrete MQTT client.

Functions§

report_topic
The report topic for a serial: device/{serial}/report.
request_topic
The request topic for a serial: device/{serial}/request.