A better Rust ATProto crate
at oauth 1.9 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.labeler.getServices 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 GetServices<'a> { 20 ///(default: false) 21 #[serde(skip_serializing_if = "std::option::Option::is_none")] 22 pub detailed: std::option::Option<bool>, 23 #[serde(borrow)] 24 pub dids: Vec<jacquard_common::types::string::Did<'a>>, 25} 26 27impl jacquard_common::IntoStatic for GetServices<'_> { 28 type Output = GetServices<'static>; 29 fn into_static(self) -> Self::Output { 30 GetServices { 31 detailed: self.detailed.into_static(), 32 dids: self.dids.into_static(), 33 } 34 } 35} 36 37#[jacquard_derive::lexicon] 38#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 39#[serde(rename_all = "camelCase")] 40pub struct GetServicesOutput<'a> { 41 #[serde(borrow)] 42 pub views: Vec<jacquard_common::types::value::Data<'a>>, 43} 44 45impl jacquard_common::IntoStatic for GetServicesOutput<'_> { 46 type Output = GetServicesOutput<'static>; 47 fn into_static(self) -> Self::Output { 48 GetServicesOutput { 49 views: self.views.into_static(), 50 extra_data: self.extra_data.into_static(), 51 } 52 } 53} 54 55impl jacquard_common::types::xrpc::XrpcRequest for GetServices<'_> { 56 const NSID: &'static str = "app.bsky.labeler.getServices"; 57 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; 58 const OUTPUT_ENCODING: &'static str = "application/json"; 59 type Output<'de> = GetServicesOutput<'de>; 60 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 61}