A better Rust ATProto crate
at main 2.2 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.feed.getFeedGenerator 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 jacquard_derive::IntoStatic 17)] 18#[builder(start_fn = new)] 19#[serde(rename_all = "camelCase")] 20pub struct GetFeedGenerator<'a> { 21 #[serde(borrow)] 22 pub feed: jacquard_common::types::string::AtUri<'a>, 23} 24 25#[jacquard_derive::lexicon] 26#[derive( 27 serde::Serialize, 28 serde::Deserialize, 29 Debug, 30 Clone, 31 PartialEq, 32 Eq, 33 jacquard_derive::IntoStatic 34)] 35#[serde(rename_all = "camelCase")] 36pub struct GetFeedGeneratorOutput<'a> { 37 /// Indicates whether the feed generator service has been online recently, or else seems to be inactive. 38 pub is_online: bool, 39 /// Indicates whether the feed generator service is compatible with the record declaration. 40 pub is_valid: bool, 41 #[serde(borrow)] 42 pub view: crate::app_bsky::feed::GeneratorView<'a>, 43} 44 45///Response type for 46///app.bsky.feed.getFeedGenerator 47pub struct GetFeedGeneratorResponse; 48impl jacquard_common::xrpc::XrpcResp for GetFeedGeneratorResponse { 49 const NSID: &'static str = "app.bsky.feed.getFeedGenerator"; 50 const ENCODING: &'static str = "application/json"; 51 type Output<'de> = GetFeedGeneratorOutput<'de>; 52 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 53} 54 55impl<'a> jacquard_common::xrpc::XrpcRequest for GetFeedGenerator<'a> { 56 const NSID: &'static str = "app.bsky.feed.getFeedGenerator"; 57 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 58 type Response = GetFeedGeneratorResponse; 59} 60 61///Endpoint type for 62///app.bsky.feed.getFeedGenerator 63pub struct GetFeedGeneratorRequest; 64impl jacquard_common::xrpc::XrpcEndpoint for GetFeedGeneratorRequest { 65 const PATH: &'static str = "/xrpc/app.bsky.feed.getFeedGenerator"; 66 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 67 type Request<'de> = GetFeedGenerator<'de>; 68 type Response = GetFeedGeneratorResponse; 69}