aboutsummaryrefslogtreecommitdiff
path: root/server/protocol
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-10-14 22:48:42 +0200
committermetamuffin <metamuffin@disroot.org>2024-10-14 22:48:42 +0200
commitfe23eeba70fce16764c8f2deb6d628487c2da131 (patch)
tree92b0b54eb50914bf8d6e0427879099e36894411c /server/protocol
parent188c76572d8606cefd394945bbce789d55797ec6 (diff)
downloadhurrycurry-fe23eeba70fce16764c8f2deb6d628487c2da131.tar
hurrycurry-fe23eeba70fce16764c8f2deb6d628487c2da131.tar.bz2
hurrycurry-fe23eeba70fce16764c8f2deb6d628487c2da131.tar.zst
send /top as document, add docstrings to doc structs
Diffstat (limited to 'server/protocol')
-rw-r--r--server/protocol/Cargo.toml2
-rw-r--r--server/protocol/src/lib.rs11
2 files changed, 10 insertions, 3 deletions
diff --git a/server/protocol/Cargo.toml b/server/protocol/Cargo.toml
index a9210d33..f600fa8a 100644
--- a/server/protocol/Cargo.toml
+++ b/server/protocol/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "hurrycurry-protocol"
-version = "7.3.0"
+version = "7.4.0"
edition = "2021"
[dependencies]
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index 3337db0a..dd773a3d 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -353,24 +353,31 @@ pub enum DocumentElement {
Document {
es: Vec<DocumentElement>,
},
+ /// One page of the document, √2:1 aspect ratio
Page {
+ /// Name of background image
background: Option<String>,
es: Vec<DocumentElement>,
},
List {
+ /// Should only contain par or text elements
es: Vec<DocumentElement>,
},
+ /// Table with elements arranged as row arrays
Table {
es: Vec<Vec<DocumentElement>>,
},
+ /// A paragraph.
Par {
+ /// Should only contain text elements
es: Vec<DocumentElement>,
},
+ /// A text span
Text {
s: Message,
- color: String,
size: f32,
- font: String,
+ color: Option<String>,
+ font: Option<String>,
#[serde(default)]
bold: bool,
},