1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Shared client-side primitives for Cinch CLI and desktop.
//!
//! Wire DTOs (`proto::cinch::v1::*`) are generated from the canonical
//! `proto/cinch/v1/*.proto` files at build time via `prost-build`; see
//! `build.rs` for the serde attribute injection that keeps wire bytes
//! byte-equal to the Go relay's `encoding/json` `omitempty` output.
//!
//! The optional `specta` feature wires up `specta::Type` derives on wire
//! DTOs that desktop exposes to the frontend. CLI builds without it.
/// Generated Rust message types from `proto/cinch/v1/*.proto`.
///
/// Wire-compatible with the Go relay's hand-written `protocol/*.go` DTOs:
/// snake_case JSON tags, `omitempty` semantics preserved via field-level
/// `skip_serializing_if` predicates injected in `build.rs`.
/// Helpers used by generated `#[serde(skip_serializing_if = "...")]`
/// attributes to mirror Go's `encoding/json` `omitempty` semantics on
/// scalar fields.