A better Rust ATProto crate
at main 2.4 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.blebbit.authr.page.getPage 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 GetPage<'a> { 21 #[serde(borrow)] 22 #[builder(into)] 23 pub id: jacquard_common::CowStr<'a>, 24} 25 26#[jacquard_derive::lexicon] 27#[derive( 28 serde::Serialize, 29 serde::Deserialize, 30 Debug, 31 Clone, 32 PartialEq, 33 Eq, 34 jacquard_derive::IntoStatic, 35 Default 36)] 37#[serde(rename_all = "camelCase")] 38pub struct GetPageOutput<'a> { 39 #[serde(skip_serializing_if = "std::option::Option::is_none")] 40 #[serde(borrow)] 41 pub content: std::option::Option<jacquard_common::CowStr<'a>>, 42 #[serde(skip_serializing_if = "std::option::Option::is_none")] 43 #[serde(borrow)] 44 pub cuid: std::option::Option<jacquard_common::CowStr<'a>>, 45 #[serde(skip_serializing_if = "std::option::Option::is_none")] 46 #[serde(borrow)] 47 pub name: std::option::Option<jacquard_common::CowStr<'a>>, 48 #[serde(skip_serializing_if = "std::option::Option::is_none")] 49 pub public: std::option::Option<bool>, 50} 51 52///Response type for 53///app.blebbit.authr.page.getPage 54pub struct GetPageResponse; 55impl jacquard_common::xrpc::XrpcResp for GetPageResponse { 56 const NSID: &'static str = "app.blebbit.authr.page.getPage"; 57 const ENCODING: &'static str = "application/json"; 58 type Output<'de> = GetPageOutput<'de>; 59 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 60} 61 62impl<'a> jacquard_common::xrpc::XrpcRequest for GetPage<'a> { 63 const NSID: &'static str = "app.blebbit.authr.page.getPage"; 64 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 65 type Response = GetPageResponse; 66} 67 68///Endpoint type for 69///app.blebbit.authr.page.getPage 70pub struct GetPageRequest; 71impl jacquard_common::xrpc::XrpcEndpoint for GetPageRequest { 72 const PATH: &'static str = "/xrpc/app.blebbit.authr.page.getPage"; 73 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 74 type Request<'de> = GetPage<'de>; 75 type Response = GetPageResponse; 76}