A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: dev.fudgeu.experimental.atforumv1.feed.reply 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///An initial post that starts a discussion 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 Reply<'a> { 21 #[serde(borrow)] 22 pub content: jacquard_common::CowStr<'a>, 23 pub created_at: jacquard_common::types::string::Datetime, 24 #[serde(borrow)] 25 pub root: jacquard_common::types::string::AtUri<'a>, 26 #[serde(skip_serializing_if = "std::option::Option::is_none")] 27 pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>, 28} 29 30/// Typed wrapper for GetRecord response with this collection's record type. 31#[derive( 32 serde::Serialize, 33 serde::Deserialize, 34 Debug, 35 Clone, 36 PartialEq, 37 Eq, 38 jacquard_derive::IntoStatic 39)] 40#[serde(rename_all = "camelCase")] 41pub struct ReplyGetRecordOutput<'a> { 42 #[serde(skip_serializing_if = "std::option::Option::is_none")] 43 #[serde(borrow)] 44 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 45 #[serde(borrow)] 46 pub uri: jacquard_common::types::string::AtUri<'a>, 47 #[serde(borrow)] 48 pub value: Reply<'a>, 49} 50 51/// Marker type for deserializing records from this collection. 52pub struct ReplyRecord; 53impl jacquard_common::xrpc::XrpcResp for ReplyRecord { 54 const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.feed.reply"; 55 const ENCODING: &'static str = "application/json"; 56 type Output<'de> = ReplyGetRecordOutput<'de>; 57 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 58} 59 60impl jacquard_common::types::collection::Collection for Reply<'_> { 61 const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.feed.reply"; 62 type Record = ReplyRecord; 63} 64 65impl From<ReplyGetRecordOutput<'_>> for Reply<'_> { 66 fn from(output: ReplyGetRecordOutput<'_>) -> Self { 67 use jacquard_common::IntoStatic; 68 output.value.into_static() 69 } 70}