jacquard_api/pub_leaflet/pages/
linear_document.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: pub.leaflet.pages.linearDocument
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10    serde::Serialize,
11    serde::Deserialize,
12    Debug,
13    Clone,
14    PartialEq,
15    Eq,
16    jacquard_derive::IntoStatic
17)]
18#[serde(rename_all = "camelCase")]
19pub struct Block<'a> {
20    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21    #[serde(borrow)]
22    pub alignment: std::option::Option<jacquard_common::CowStr<'a>>,
23    #[serde(borrow)]
24    pub block: BlockRecordBlock<'a>,
25}
26
27#[jacquard_derive::open_union]
28#[derive(
29    serde::Serialize,
30    serde::Deserialize,
31    Debug,
32    Clone,
33    PartialEq,
34    Eq,
35    jacquard_derive::IntoStatic
36)]
37#[serde(tag = "$type")]
38#[serde(bound(deserialize = "'de: 'a"))]
39pub enum BlockRecordBlock<'a> {
40    #[serde(rename = "pub.leaflet.blocks.iframe")]
41    Iframe(Box<crate::pub_leaflet::blocks::iframe::Iframe<'a>>),
42    #[serde(rename = "pub.leaflet.blocks.text")]
43    Text(Box<crate::pub_leaflet::blocks::text::Text<'a>>),
44    #[serde(rename = "pub.leaflet.blocks.blockquote")]
45    Blockquote(Box<crate::pub_leaflet::blocks::blockquote::Blockquote<'a>>),
46    #[serde(rename = "pub.leaflet.blocks.header")]
47    Header(Box<crate::pub_leaflet::blocks::header::Header<'a>>),
48    #[serde(rename = "pub.leaflet.blocks.image")]
49    Image(Box<crate::pub_leaflet::blocks::image::Image<'a>>),
50    #[serde(rename = "pub.leaflet.blocks.unorderedList")]
51    UnorderedList(Box<crate::pub_leaflet::blocks::unordered_list::UnorderedList<'a>>),
52    #[serde(rename = "pub.leaflet.blocks.website")]
53    Website(Box<crate::pub_leaflet::blocks::website::Website<'a>>),
54    #[serde(rename = "pub.leaflet.blocks.math")]
55    Math(Box<crate::pub_leaflet::blocks::math::Math<'a>>),
56    #[serde(rename = "pub.leaflet.blocks.code")]
57    Code(Box<crate::pub_leaflet::blocks::code::Code<'a>>),
58    #[serde(rename = "pub.leaflet.blocks.horizontalRule")]
59    HorizontalRule(Box<crate::pub_leaflet::blocks::horizontal_rule::HorizontalRule<'a>>),
60    #[serde(rename = "pub.leaflet.blocks.bskyPost")]
61    BskyPost(Box<crate::pub_leaflet::blocks::bsky_post::BskyPost<'a>>),
62}
63
64#[jacquard_derive::lexicon]
65#[derive(
66    serde::Serialize,
67    serde::Deserialize,
68    Debug,
69    Clone,
70    PartialEq,
71    Eq,
72    jacquard_derive::IntoStatic
73)]
74#[serde(rename_all = "camelCase")]
75pub struct LinearDocument<'a> {
76    #[serde(skip_serializing_if = "std::option::Option::is_none")]
77    #[serde(borrow)]
78    pub blocks: std::option::Option<
79        Vec<crate::pub_leaflet::pages::linear_document::Block<'a>>,
80    >,
81}
82
83#[jacquard_derive::lexicon]
84#[derive(
85    serde::Serialize,
86    serde::Deserialize,
87    Debug,
88    Clone,
89    PartialEq,
90    Eq,
91    jacquard_derive::IntoStatic
92)]
93#[serde(rename_all = "camelCase")]
94pub struct Position<'a> {
95    pub block: Vec<i64>,
96    pub offset: i64,
97}
98
99#[jacquard_derive::lexicon]
100#[derive(
101    serde::Serialize,
102    serde::Deserialize,
103    Debug,
104    Clone,
105    PartialEq,
106    Eq,
107    jacquard_derive::IntoStatic
108)]
109#[serde(rename_all = "camelCase")]
110pub struct Quote<'a> {
111    #[serde(borrow)]
112    pub end: crate::pub_leaflet::pages::linear_document::Position<'a>,
113    #[serde(borrow)]
114    pub start: crate::pub_leaflet::pages::linear_document::Position<'a>,
115}
116
117#[derive(
118    serde::Serialize,
119    serde::Deserialize,
120    Debug,
121    Clone,
122    PartialEq,
123    Eq,
124    Hash,
125    jacquard_derive::IntoStatic
126)]
127pub struct TextAlignCenter;
128impl std::fmt::Display for TextAlignCenter {
129    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
130        write!(f, "textAlignCenter")
131    }
132}
133
134#[derive(
135    serde::Serialize,
136    serde::Deserialize,
137    Debug,
138    Clone,
139    PartialEq,
140    Eq,
141    Hash,
142    jacquard_derive::IntoStatic
143)]
144pub struct TextAlignLeft;
145impl std::fmt::Display for TextAlignLeft {
146    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
147        write!(f, "textAlignLeft")
148    }
149}
150
151#[derive(
152    serde::Serialize,
153    serde::Deserialize,
154    Debug,
155    Clone,
156    PartialEq,
157    Eq,
158    Hash,
159    jacquard_derive::IntoStatic
160)]
161pub struct TextAlignRight;
162impl std::fmt::Display for TextAlignRight {
163    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
164        write!(f, "textAlignRight")
165    }
166}