From fe23eeba70fce16764c8f2deb6d628487c2da131 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 14 Oct 2024 22:48:42 +0200 Subject: send /top as document, add docstrings to doc structs --- server/protocol/Cargo.toml | 2 +- server/protocol/src/lib.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'server/protocol') 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, }, + /// One page of the document, √2:1 aspect ratio Page { + /// Name of background image background: Option, es: Vec, }, List { + /// Should only contain par or text elements es: Vec, }, + /// Table with elements arranged as row arrays Table { es: Vec>, }, + /// A paragraph. Par { + /// Should only contain text elements es: Vec, }, + /// A text span Text { s: Message, - color: String, size: f32, - font: String, + color: Option, + font: Option, #[serde(default)] bold: bool, }, -- cgit v1.2.3-70-g09d2