A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: net.aftertheinter.coolthingtwo 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 Coolthingtwo<'a> { 20 pub created_at: jacquard_common::types::string::Datetime, 21 #[serde(borrow)] 22 pub status: jacquard_common::CowStr<'a>, 23} 24 25/// Typed wrapper for GetRecord response with this collection's record type. 26#[derive( 27 serde::Serialize, 28 serde::Deserialize, 29 Debug, 30 Clone, 31 PartialEq, 32 Eq, 33 jacquard_derive::IntoStatic 34)] 35#[serde(rename_all = "camelCase")] 36pub struct CoolthingtwoGetRecordOutput<'a> { 37 #[serde(skip_serializing_if = "std::option::Option::is_none")] 38 #[serde(borrow)] 39 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 40 #[serde(borrow)] 41 pub uri: jacquard_common::types::string::AtUri<'a>, 42 #[serde(borrow)] 43 pub value: Coolthingtwo<'a>, 44} 45 46/// Marker type for deserializing records from this collection. 47pub struct CoolthingtwoRecord; 48impl jacquard_common::xrpc::XrpcResp for CoolthingtwoRecord { 49 const NSID: &'static str = "net.aftertheinter.coolthingtwo"; 50 const ENCODING: &'static str = "application/json"; 51 type Output<'de> = CoolthingtwoGetRecordOutput<'de>; 52 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 53} 54 55impl jacquard_common::types::collection::Collection for Coolthingtwo<'_> { 56 const NSID: &'static str = "net.aftertheinter.coolthingtwo"; 57 type Record = CoolthingtwoRecord; 58} 59 60impl From<CoolthingtwoGetRecordOutput<'_>> for Coolthingtwo<'_> { 61 fn from(output: CoolthingtwoGetRecordOutput<'_>) -> Self { 62 use jacquard_common::IntoStatic; 63 output.value.into_static() 64 } 65}