adapto_client_protocol 0.1.2

WebSocket protocol types for Adapto client-server communication
Documentation

adapto_client_protocol

WebSocket protocol types for Adapto client-server communication — DOM patch operations, server messages, action dispatching.

Part of the Adapto web framework.

Features

  • PatchOp — DOM patch operations: ReplaceHtml, SetAttribute, RemoveElement
  • ServerMessage — typed server-to-client messages with payload
  • PatchMessage — batched patch operations for efficient DOM updates

Usage

This crate is used internally by adapto_app for WebSocket communication. You typically don't need to depend on it directly.

[dependencies]
adapto_client_protocol = "0.1"
use adapto_client_protocol::patch::{PatchOp, PatchMessage};

let patch = PatchMessage {
    ops: vec![
        PatchOp::ReplaceHtml {
            target: "#content".to_string(),
            html: "<p>Updated</p>".to_string(),
        },
    ],
};

License

MIT — Saken Tukenov