A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: sh.weaver.notebook.authors 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///A single author in a Weaver notebook. 9#[jacquard_derive::lexicon] 10#[derive( 11 serde::Serialize, 12 serde::Deserialize, 13 Debug, 14 Clone, 15 PartialEq, 16 Eq, 17 jacquard_derive::IntoStatic 18)] 19#[serde(rename_all = "camelCase")] 20pub struct AuthorListItem<'a> { 21 #[serde(skip_serializing_if = "std::option::Option::is_none")] 22 pub index: std::option::Option<i64>, 23 #[serde(skip_serializing_if = "std::option::Option::is_none")] 24 #[serde(borrow)] 25 pub profile: std::option::Option<AuthorListItemRecordProfile<'a>>, 26} 27 28#[jacquard_derive::open_union] 29#[derive( 30 serde::Serialize, 31 serde::Deserialize, 32 Debug, 33 Clone, 34 PartialEq, 35 Eq, 36 jacquard_derive::IntoStatic 37)] 38#[serde(tag = "$type")] 39#[serde(bound(deserialize = "'de: 'a"))] 40pub enum AuthorListItemRecordProfile<'a> { 41 #[serde(rename = "app.bsky.actor.defs#profileViewBasic")] 42 DefsProfileViewBasic(Box<crate::app_bsky::actor::ProfileViewBasic<'a>>), 43 #[serde(rename = "sh.weaver.actor.defs#profileView")] 44 DefsProfileView(Box<crate::sh_weaver::actor::ProfileView<'a>>), 45} 46 47///Authors of a Weaver notebook. 48#[jacquard_derive::lexicon] 49#[derive( 50 serde::Serialize, 51 serde::Deserialize, 52 Debug, 53 Clone, 54 PartialEq, 55 Eq, 56 jacquard_derive::IntoStatic 57)] 58#[serde(rename_all = "camelCase")] 59pub struct Authors<'a> { 60 #[serde(borrow)] 61 pub author_list: Vec<crate::sh_weaver::notebook::authors::AuthorListItem<'a>>, 62 #[serde(skip_serializing_if = "std::option::Option::is_none")] 63 pub created_at: std::option::Option<jacquard_common::types::string::Datetime>, 64} 65 66impl jacquard_common::types::collection::Collection for Authors<'_> { 67 const NSID: &'static str = "sh.weaver.notebook.authors"; 68}