Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire protocol types shared across CLI, desktop, and the relay’s WS frame.

Clip and DeviceInfo are re-exported from the in-crate proto module, generated from proto/cinch/v1/*.proto. WSMessage and the action constants stay hand-written: the WebSocket envelope’s “action + 8 optional siblings” shape doesn’t map cleanly onto a proto oneof, and migrating it would change the WS wire format. That work is tracked separately.

Action constants must match the Go relay verbatim (see protocol/ws.go Action* constants). Wire field names must not change without coordinated updates across all consumers.

Re-exports§

pub use crate::proto::cinch::v1::Clip;
pub use crate::proto::cinch::v1::Device as DeviceInfo;

Structs§

WSMessage

Constants§

ACTION_CLIPBOARD_CONTENT
ACTION_CLIP_DELETED
ACTION_CLIP_PINNED
ACTION_DEVICE_CODE_PENDING
ACTION_KEY_EXCHANGE_REQUESTED
ACTION_NEW_CLIP
ACTION_PING
ACTION_PONG
ACTION_REVOKED
ACTION_SEND_CLIPBOARD
ACTION_TOKEN_ROTATED