A better Rust ATProto crate
at oauth 2.2 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.unspecced.getTrendingTopics 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 GetTrendingTopics<'a> { 20 ///(default: 10, min: 1, max: 25) 21 #[serde(skip_serializing_if = "std::option::Option::is_none")] 22 pub limit: std::option::Option<i64>, 23 #[serde(skip_serializing_if = "std::option::Option::is_none")] 24 #[serde(borrow)] 25 pub viewer: std::option::Option<jacquard_common::types::string::Did<'a>>, 26} 27 28impl jacquard_common::IntoStatic for GetTrendingTopics<'_> { 29 type Output = GetTrendingTopics<'static>; 30 fn into_static(self) -> Self::Output { 31 GetTrendingTopics { 32 limit: self.limit.into_static(), 33 viewer: self.viewer.into_static(), 34 } 35 } 36} 37 38#[jacquard_derive::lexicon] 39#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 40#[serde(rename_all = "camelCase")] 41pub struct GetTrendingTopicsOutput<'a> { 42 #[serde(borrow)] 43 pub suggested: Vec<crate::app_bsky::unspecced::TrendingTopic<'a>>, 44 #[serde(borrow)] 45 pub topics: Vec<crate::app_bsky::unspecced::TrendingTopic<'a>>, 46} 47 48impl jacquard_common::IntoStatic for GetTrendingTopicsOutput<'_> { 49 type Output = GetTrendingTopicsOutput<'static>; 50 fn into_static(self) -> Self::Output { 51 GetTrendingTopicsOutput { 52 suggested: self.suggested.into_static(), 53 topics: self.topics.into_static(), 54 extra_data: self.extra_data.into_static(), 55 } 56 } 57} 58 59impl jacquard_common::types::xrpc::XrpcRequest for GetTrendingTopics<'_> { 60 const NSID: &'static str = "app.bsky.unspecced.getTrendingTopics"; 61 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; 62 const OUTPUT_ENCODING: &'static str = "application/json"; 63 type Output<'de> = GetTrendingTopicsOutput<'de>; 64 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 65}