diff options
author | metamuffin <metamuffin@disroot.org> | 2024-10-14 22:48:42 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-10-14 22:48:42 +0200 |
commit | fe23eeba70fce16764c8f2deb6d628487c2da131 (patch) | |
tree | 92b0b54eb50914bf8d6e0427879099e36894411c /server/protocol/src/lib.rs | |
parent | 188c76572d8606cefd394945bbce789d55797ec6 (diff) | |
download | hurrycurry-fe23eeba70fce16764c8f2deb6d628487c2da131.tar hurrycurry-fe23eeba70fce16764c8f2deb6d628487c2da131.tar.bz2 hurrycurry-fe23eeba70fce16764c8f2deb6d628487c2da131.tar.zst |
send /top as document, add docstrings to doc structs
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r-- | server/protocol/src/lib.rs | 11 |
1 files changed, 9 insertions, 2 deletions
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, }, |