A better Rust ATProto crate
at oauth 3.1 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.feed.describeFeedGenerator 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(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 10#[serde(rename_all = "camelCase")] 11pub struct Feed<'a> { 12 #[serde(borrow)] 13 pub uri: jacquard_common::types::string::AtUri<'a>, 14} 15 16impl jacquard_common::IntoStatic for Feed<'_> { 17 type Output = Feed<'static>; 18 fn into_static(self) -> Self::Output { 19 Feed { 20 uri: self.uri.into_static(), 21 extra_data: self.extra_data.into_static(), 22 } 23 } 24} 25 26#[jacquard_derive::lexicon] 27#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 28#[serde(rename_all = "camelCase")] 29pub struct Links<'a> { 30 #[serde(skip_serializing_if = "std::option::Option::is_none")] 31 #[serde(borrow)] 32 pub privacy_policy: std::option::Option<jacquard_common::CowStr<'a>>, 33 #[serde(skip_serializing_if = "std::option::Option::is_none")] 34 #[serde(borrow)] 35 pub terms_of_service: std::option::Option<jacquard_common::CowStr<'a>>, 36} 37 38impl jacquard_common::IntoStatic for Links<'_> { 39 type Output = Links<'static>; 40 fn into_static(self) -> Self::Output { 41 Links { 42 privacy_policy: self.privacy_policy.into_static(), 43 terms_of_service: self.terms_of_service.into_static(), 44 extra_data: self.extra_data.into_static(), 45 } 46 } 47} 48 49#[jacquard_derive::lexicon] 50#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 51#[serde(rename_all = "camelCase")] 52pub struct DescribeFeedGeneratorOutput<'a> { 53 #[serde(borrow)] 54 pub did: jacquard_common::types::string::Did<'a>, 55 #[serde(borrow)] 56 pub feeds: Vec<jacquard_common::types::value::Data<'a>>, 57 #[serde(skip_serializing_if = "std::option::Option::is_none")] 58 #[serde(borrow)] 59 pub links: std::option::Option<jacquard_common::types::value::Data<'a>>, 60} 61 62impl jacquard_common::IntoStatic for DescribeFeedGeneratorOutput<'_> { 63 type Output = DescribeFeedGeneratorOutput<'static>; 64 fn into_static(self) -> Self::Output { 65 DescribeFeedGeneratorOutput { 66 did: self.did.into_static(), 67 feeds: self.feeds.into_static(), 68 links: self.links.into_static(), 69 extra_data: self.extra_data.into_static(), 70 } 71 } 72} 73 74/// XRPC request marker type 75#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] 76pub struct DescribeFeedGenerator; 77impl jacquard_common::types::xrpc::XrpcRequest for DescribeFeedGenerator { 78 const NSID: &'static str = "app.bsky.feed.describeFeedGenerator"; 79 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; 80 const OUTPUT_ENCODING: &'static str = "application/json"; 81 type Output<'de> = DescribeFeedGeneratorOutput<'de>; 82 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 83}