A better Rust ATProto crate
at main 2.0 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: com.atproto.admin.getAccountInfo 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 GetAccountInfo<'a> { 21 #[serde(borrow)] 22 pub did: jacquard_common::types::string::Did<'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 GetAccountInfoOutput<'a> { 37 #[serde(flatten)] 38 #[serde(borrow)] 39 pub value: crate::com_atproto::admin::AccountView<'a>, 40} 41 42///Response type for 43///com.atproto.admin.getAccountInfo 44pub struct GetAccountInfoResponse; 45impl jacquard_common::xrpc::XrpcResp for GetAccountInfoResponse { 46 const NSID: &'static str = "com.atproto.admin.getAccountInfo"; 47 const ENCODING: &'static str = "application/json"; 48 type Output<'de> = GetAccountInfoOutput<'de>; 49 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 50} 51 52impl<'a> jacquard_common::xrpc::XrpcRequest for GetAccountInfo<'a> { 53 const NSID: &'static str = "com.atproto.admin.getAccountInfo"; 54 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 55 type Response = GetAccountInfoResponse; 56} 57 58///Endpoint type for 59///com.atproto.admin.getAccountInfo 60pub struct GetAccountInfoRequest; 61impl jacquard_common::xrpc::XrpcEndpoint for GetAccountInfoRequest { 62 const PATH: &'static str = "/xrpc/com.atproto.admin.getAccountInfo"; 63 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 64 type Request<'de> = GetAccountInfo<'de>; 65 type Response = GetAccountInfoResponse; 66}