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