A better Rust ATProto crate
at main 2.4 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: buzz.bookhive.hiveBook 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///A book within the hive 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 HiveBook<'a> { 21 ///The authors of the book (tab separated) 22 #[serde(borrow)] 23 pub authors: jacquard_common::CowStr<'a>, 24 ///URL to full-size cover image 25 #[serde(skip_serializing_if = "std::option::Option::is_none")] 26 #[serde(borrow)] 27 pub cover: std::option::Option<jacquard_common::CowStr<'a>>, 28 pub created_at: jacquard_common::types::string::Datetime, 29 ///Book description/summary 30 #[serde(skip_serializing_if = "std::option::Option::is_none")] 31 #[serde(borrow)] 32 pub description: std::option::Option<jacquard_common::CowStr<'a>>, 33 ///The book's hive id, used to correlate user's books with the hive 34 #[serde(borrow)] 35 pub id: jacquard_common::CowStr<'a>, 36 ///Average rating (0-1000) 37 #[serde(skip_serializing_if = "std::option::Option::is_none")] 38 pub rating: std::option::Option<i64>, 39 ///Number of ratings 40 #[serde(skip_serializing_if = "std::option::Option::is_none")] 41 pub ratings_count: std::option::Option<i64>, 42 ///The source service name (e.g. Goodreads) 43 #[serde(skip_serializing_if = "std::option::Option::is_none")] 44 #[serde(borrow)] 45 pub source: std::option::Option<jacquard_common::CowStr<'a>>, 46 ///ID of the book in the source service 47 #[serde(skip_serializing_if = "std::option::Option::is_none")] 48 #[serde(borrow)] 49 pub source_id: std::option::Option<jacquard_common::CowStr<'a>>, 50 ///URL to the book on the source service 51 #[serde(skip_serializing_if = "std::option::Option::is_none")] 52 #[serde(borrow)] 53 pub source_url: std::option::Option<jacquard_common::CowStr<'a>>, 54 ///URL to thumbnail image 55 #[serde(borrow)] 56 pub thumbnail: jacquard_common::CowStr<'a>, 57 ///The title of the book 58 #[serde(borrow)] 59 pub title: jacquard_common::CowStr<'a>, 60 pub updated_at: jacquard_common::types::string::Datetime, 61} 62 63impl jacquard_common::types::collection::Collection for HiveBook<'_> { 64 const NSID: &'static str = "buzz.bookhive.hiveBook"; 65}