Strata is pre-1.0. APIs, protocol, and storage format may change.
strata_protocol/presence
Presence payload carried by presence_set (client → server) and
presence_state / presence_diff (server → client) frames.
Strata's presence model is intentionally minimal: a display name, a
stable color seed, and an opaque cursor blob the server passes
through unchanged. Clients can stuff selection ranges, viewport state,
or anything else into the cursor field; the server never inspects it.
Presence
Section titled “Presence”Presence record for a single connected user.
pub type Presence { Presence(session_id: option.Option(String), name: String, color: String, cursor: dynamic.Dynamic)}Functions
Section titled “Functions”decoder
Section titled “decoder”Decoder for a Presence JSON object.
pub fn decoder() -> decode.Decoder(Presence)encode
Section titled “encode”Encode a Presence to JSON.
session_id is omitted when None.
pub fn encode(Presence) -> json.Json