A better Rust ATProto crate
at oauth 1.7 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: chat.bsky.convo.getConvo 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8#[derive( 9 serde::Serialize, 10 serde::Deserialize, 11 Debug, 12 Clone, 13 PartialEq, 14 Eq, 15 bon::Builder 16)] 17#[builder(start_fn = new)] 18#[serde(rename_all = "camelCase")] 19pub struct GetConvo<'a> { 20 #[serde(borrow)] 21 #[builder(into)] 22 pub convo_id: jacquard_common::CowStr<'a>, 23} 24 25impl jacquard_common::IntoStatic for GetConvo<'_> { 26 type Output = GetConvo<'static>; 27 fn into_static(self) -> Self::Output { 28 GetConvo { 29 convo_id: self.convo_id.into_static(), 30 } 31 } 32} 33 34#[jacquard_derive::lexicon] 35#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 36#[serde(rename_all = "camelCase")] 37pub struct GetConvoOutput<'a> { 38 #[serde(borrow)] 39 pub convo: crate::chat_bsky::convo::ConvoView<'a>, 40} 41 42impl jacquard_common::IntoStatic for GetConvoOutput<'_> { 43 type Output = GetConvoOutput<'static>; 44 fn into_static(self) -> Self::Output { 45 GetConvoOutput { 46 convo: self.convo.into_static(), 47 extra_data: self.extra_data.into_static(), 48 } 49 } 50} 51 52impl jacquard_common::types::xrpc::XrpcRequest for GetConvo<'_> { 53 const NSID: &'static str = "chat.bsky.convo.getConvo"; 54 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; 55 const OUTPUT_ENCODING: &'static str = "application/json"; 56 type Output<'de> = GetConvoOutput<'de>; 57 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 58}