Skip to main content

Crate weave_contracts

Crate weave_contracts 

Source
Expand description

WebSocket protocol types shared between edge-agent and weave-server.

Wire format: JSON text frames. Each frame is a single ServerToEdge or EdgeToServer value serialized as JSON. The runtime binds to a LAN IP and performs no authentication.

Structs§

DeviceStateEntry
EdgeConfig
Complete config for one edge, pushed as a ConfigFull frame.
EdgeInfo
Identity + status for one connected (or previously-seen) edge.
FeedbackRule
Feedback rule: service state → device visual feedback.
Glyph
A named Nuimo LED glyph. pattern is a 9x9 ASCII grid compatible with nuimo::Glyph::from_str (* = LED on, anything else = off, rows separated by \n).
Mapping
A device-to-service mapping. Mirrors the structure already used by weave-server’s REST API. edge_id is new; all other fields retain their existing semantics.
Route
One input-to-intent route inside a mapping.
ServiceStateEntry
TargetCandidate
One entry in Mapping::target_candidates. During selection mode the device displays glyph and, on confirm, the mapping’s service_target is replaced with target.
UiSnapshot
Initial full state sent on /ws/ui connect. Subsequent changes arrive as UiFrame variants.

Enums§

CommandResult
Outcome of an EdgeToServer::Command.
EdgeToServer
Frames sent from an edge-agent to weave-server.
ErrorSeverity
Severity classification for EdgeToServer::Error and UiFrame::Error.
PatchOp
ServerToEdge
Frames sent from weave-server to an edge-agent.
UiFrame
Frames sent from weave-server to a Web UI client on /ws/ui.