A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: sh.weaver.notebook.defs 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod authors; 9pub mod book; 10pub mod chapter; 11pub mod entry; 12 13#[jacquard_derive::lexicon] 14#[derive( 15 serde::Serialize, 16 serde::Deserialize, 17 Debug, 18 Clone, 19 PartialEq, 20 Eq, 21 jacquard_derive::IntoStatic, 22 bon::Builder 23)] 24#[serde(rename_all = "camelCase")] 25pub struct AuthorListView<'a> { 26 #[serde(skip_serializing_if = "std::option::Option::is_none")] 27 #[builder(into)] 28 #[serde(borrow)] 29 pub cid: Option<jacquard_common::types::string::Cid<'a>>, 30 pub index: i64, 31 #[serde(skip_serializing_if = "std::option::Option::is_none")] 32 #[builder(into)] 33 #[serde(borrow)] 34 pub record: Option<jacquard_common::types::value::Data<'a>>, 35 #[serde(skip_serializing_if = "std::option::Option::is_none")] 36 #[builder(into)] 37 #[serde(borrow)] 38 pub uri: Option<jacquard_common::types::string::AtUri<'a>>, 39} 40 41#[jacquard_derive::lexicon] 42#[derive( 43 serde::Serialize, 44 serde::Deserialize, 45 Debug, 46 Clone, 47 PartialEq, 48 Eq, 49 jacquard_derive::IntoStatic, 50 bon::Builder 51)] 52#[serde(rename_all = "camelCase")] 53pub struct BookEntryRef<'a> { 54 #[serde(borrow)] 55 pub entry: crate::sh_weaver::notebook::EntryView<'a>, 56} 57 58/// An ordered entry in a Weaver notebook. 59#[jacquard_derive::lexicon] 60#[derive( 61 serde::Serialize, 62 serde::Deserialize, 63 Debug, 64 Clone, 65 PartialEq, 66 Eq, 67 jacquard_derive::IntoStatic, 68 bon::Builder 69)] 70#[serde(rename_all = "camelCase")] 71pub struct BookEntryView<'a> { 72 #[serde(borrow)] 73 pub entry: crate::sh_weaver::notebook::EntryView<'a>, 74 pub index: i64, 75 #[serde(skip_serializing_if = "std::option::Option::is_none")] 76 #[builder(into)] 77 #[serde(borrow)] 78 pub next: Option<crate::sh_weaver::notebook::BookEntryRef<'a>>, 79 #[serde(skip_serializing_if = "std::option::Option::is_none")] 80 #[builder(into)] 81 #[serde(borrow)] 82 pub prev: Option<crate::sh_weaver::notebook::BookEntryRef<'a>>, 83} 84 85/// The format of the content. This is used to determine how to render the content. 86#[jacquard_derive::lexicon] 87#[derive( 88 serde::Serialize, 89 serde::Deserialize, 90 Debug, 91 Clone, 92 PartialEq, 93 Eq, 94 jacquard_derive::IntoStatic, 95 Default 96)] 97#[serde(rename_all = "camelCase")] 98pub struct ContentFormat<'a> { 99 /// The format of the content. This is used to determine how to render the content. 100 #[serde(skip_serializing_if = "std::option::Option::is_none")] 101 #[serde(borrow)] 102 pub markdown: std::option::Option<jacquard_common::CowStr<'a>>, 103} 104 105#[jacquard_derive::lexicon] 106#[derive( 107 serde::Serialize, 108 serde::Deserialize, 109 Debug, 110 Clone, 111 PartialEq, 112 Eq, 113 jacquard_derive::IntoStatic, 114 bon::Builder 115)] 116#[serde(rename_all = "camelCase")] 117pub struct EntryView<'a> { 118 #[serde(skip_serializing_if = "std::option::Option::is_none")] 119 #[builder(into)] 120 #[serde(borrow)] 121 pub authors: Option<crate::sh_weaver::notebook::AuthorListView<'a>>, 122 #[serde(borrow)] 123 pub cid: jacquard_common::types::string::Cid<'a>, 124 pub indexed_at: jacquard_common::types::string::Datetime, 125 #[serde(borrow)] 126 pub record: jacquard_common::types::value::Data<'a>, 127 #[serde(skip_serializing_if = "std::option::Option::is_none")] 128 #[builder(into)] 129 #[serde(borrow)] 130 pub rendered_view: Option<crate::sh_weaver::notebook::RenderedView<'a>>, 131 #[serde(skip_serializing_if = "std::option::Option::is_none")] 132 #[builder(into)] 133 #[serde(borrow)] 134 pub tags: Option<crate::sh_weaver::notebook::Tags<'a>>, 135 #[serde(skip_serializing_if = "std::option::Option::is_none")] 136 #[builder(into)] 137 #[serde(borrow)] 138 pub title: Option<crate::sh_weaver::notebook::Title<'a>>, 139 #[serde(borrow)] 140 pub uri: jacquard_common::types::string::AtUri<'a>, 141} 142 143#[jacquard_derive::lexicon] 144#[derive( 145 serde::Serialize, 146 serde::Deserialize, 147 Debug, 148 Clone, 149 PartialEq, 150 Eq, 151 jacquard_derive::IntoStatic, 152 bon::Builder 153)] 154#[serde(rename_all = "camelCase")] 155pub struct NotebookView<'a> { 156 #[serde(skip_serializing_if = "std::option::Option::is_none")] 157 #[builder(into)] 158 #[serde(borrow)] 159 pub authors: Option<crate::sh_weaver::notebook::AuthorListView<'a>>, 160 #[serde(borrow)] 161 pub cid: jacquard_common::types::string::Cid<'a>, 162 pub indexed_at: jacquard_common::types::string::Datetime, 163 #[serde(borrow)] 164 pub record: jacquard_common::types::value::Data<'a>, 165 #[serde(skip_serializing_if = "std::option::Option::is_none")] 166 #[builder(into)] 167 #[serde(borrow)] 168 pub tags: Option<crate::sh_weaver::notebook::Tags<'a>>, 169 #[serde(skip_serializing_if = "std::option::Option::is_none")] 170 #[builder(into)] 171 #[serde(borrow)] 172 pub title: Option<crate::sh_weaver::notebook::Title<'a>>, 173 #[serde(borrow)] 174 pub uri: jacquard_common::types::string::AtUri<'a>, 175} 176 177/// View of a rendered and cached notebook entry 178#[jacquard_derive::lexicon] 179#[derive( 180 serde::Serialize, 181 serde::Deserialize, 182 Debug, 183 Clone, 184 PartialEq, 185 Eq, 186 jacquard_derive::IntoStatic, 187 bon::Builder 188)] 189#[serde(rename_all = "camelCase")] 190pub struct RenderedView<'a> { 191 #[serde(skip_serializing_if = "std::option::Option::is_none")] 192 #[builder(into)] 193 #[serde(borrow)] 194 pub css: Option<jacquard_common::types::blob::Blob<'a>>, 195 #[serde(borrow)] 196 pub html: jacquard_common::types::blob::Blob<'a>, 197} 198 199/// An array of tags associated with the notebook entry. Tags can help categorize and organize entries. 200pub type Tags<'a> = Vec<jacquard_common::CowStr<'a>>; 201/// The title of the notebook entry. 202pub type Title<'a> = jacquard_common::CowStr<'a>;