A better Rust ATProto crate
at main 2.0 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: buzz.bookhive.getProfile 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 GetProfile<'a> { 21 #[serde(skip_serializing_if = "std::option::Option::is_none")] 22 #[serde(borrow)] 23 #[builder(into)] 24 pub did: std::option::Option<jacquard_common::CowStr<'a>>, 25 #[serde(skip_serializing_if = "std::option::Option::is_none")] 26 #[serde(borrow)] 27 #[builder(into)] 28 pub handle: std::option::Option<jacquard_common::CowStr<'a>>, 29} 30 31#[jacquard_derive::lexicon] 32#[derive( 33 serde::Serialize, 34 serde::Deserialize, 35 Debug, 36 Clone, 37 PartialEq, 38 Eq, 39 jacquard_derive::IntoStatic 40)] 41#[serde(rename_all = "camelCase")] 42pub struct GetProfileOutput<'a> { 43 ///The user's activity 44 #[serde(borrow)] 45 pub activity: Vec<crate::buzz_bookhive::Activity<'a>>, 46 ///All books in the user's library 47 #[serde(borrow)] 48 pub books: Vec<crate::buzz_bookhive::UserBook<'a>>, 49 ///The user's profile 50 #[serde(borrow)] 51 pub profile: crate::buzz_bookhive::Profile<'a>, 52} 53 54///Response type for 55///buzz.bookhive.getProfile 56pub struct GetProfileResponse; 57impl jacquard_common::xrpc::XrpcResp for GetProfileResponse { 58 const NSID: &'static str = "buzz.bookhive.getProfile"; 59 const ENCODING: &'static str = "application/json"; 60 type Output<'de> = GetProfileOutput<'de>; 61 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 62} 63 64impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for GetProfile<'de> { 65 const NSID: &'static str = "buzz.bookhive.getProfile"; 66 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 67 type Response = GetProfileResponse; 68}