A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: net.anisota.feed.list 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///A list of posts for curation, bookmarking, or organization 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 List<'a> { 21 ///Optional avatar image for the list 22 #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 #[serde(borrow)] 24 pub avatar: std::option::Option<jacquard_common::types::blob::Blob<'a>>, 25 ///When the list was created 26 pub created_at: jacquard_common::types::string::Datetime, 27 ///Optional description of the list 28 #[serde(skip_serializing_if = "std::option::Option::is_none")] 29 #[serde(borrow)] 30 pub description: std::option::Option<jacquard_common::CowStr<'a>>, 31 ///Display name for the list 32 #[serde(borrow)] 33 pub name: jacquard_common::CowStr<'a>, 34 ///Tags for categorizing the list 35 #[serde(skip_serializing_if = "std::option::Option::is_none")] 36 #[serde(borrow)] 37 pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>, 38} 39 40/// Typed wrapper for GetRecord response with this collection's record type. 41#[derive( 42 serde::Serialize, 43 serde::Deserialize, 44 Debug, 45 Clone, 46 PartialEq, 47 Eq, 48 jacquard_derive::IntoStatic 49)] 50#[serde(rename_all = "camelCase")] 51pub struct ListGetRecordOutput<'a> { 52 #[serde(skip_serializing_if = "std::option::Option::is_none")] 53 #[serde(borrow)] 54 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 55 #[serde(borrow)] 56 pub uri: jacquard_common::types::string::AtUri<'a>, 57 #[serde(borrow)] 58 pub value: List<'a>, 59} 60 61/// Marker type for deserializing records from this collection. 62pub struct ListRecord; 63impl jacquard_common::xrpc::XrpcResp for ListRecord { 64 const NSID: &'static str = "net.anisota.feed.list"; 65 const ENCODING: &'static str = "application/json"; 66 type Output<'de> = ListGetRecordOutput<'de>; 67 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 68} 69 70impl jacquard_common::types::collection::Collection for List<'_> { 71 const NSID: &'static str = "net.anisota.feed.list"; 72 type Record = ListRecord; 73} 74 75impl From<ListGetRecordOutput<'_>> for List<'_> { 76 fn from(output: ListGetRecordOutput<'_>) -> Self { 77 use jacquard_common::IntoStatic; 78 output.value.into_static() 79 } 80}