A better Rust ATProto crate
at main 2.1 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: com.atproto.temp.fetchLabels 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 FetchLabels { 21 ///(default: 50, min: 1, max: 250) 22 #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 pub limit: std::option::Option<i64>, 24 #[serde(skip_serializing_if = "std::option::Option::is_none")] 25 pub since: std::option::Option<i64>, 26} 27 28#[jacquard_derive::lexicon] 29#[derive( 30 serde::Serialize, 31 serde::Deserialize, 32 Debug, 33 Clone, 34 PartialEq, 35 Eq, 36 jacquard_derive::IntoStatic 37)] 38#[serde(rename_all = "camelCase")] 39pub struct FetchLabelsOutput<'a> { 40 #[serde(borrow)] 41 pub labels: Vec<crate::com_atproto::label::Label<'a>>, 42} 43 44///Response type for 45///com.atproto.temp.fetchLabels 46pub struct FetchLabelsResponse; 47impl jacquard_common::xrpc::XrpcResp for FetchLabelsResponse { 48 const NSID: &'static str = "com.atproto.temp.fetchLabels"; 49 const ENCODING: &'static str = "application/json"; 50 type Output<'de> = FetchLabelsOutput<'de>; 51 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 52} 53 54impl jacquard_common::xrpc::XrpcRequest for FetchLabels { 55 const NSID: &'static str = "com.atproto.temp.fetchLabels"; 56 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 type Response = FetchLabelsResponse; 58} 59 60///Endpoint type for 61///com.atproto.temp.fetchLabels 62pub struct FetchLabelsRequest; 63impl jacquard_common::xrpc::XrpcEndpoint for FetchLabelsRequest { 64 const PATH: &'static str = "/xrpc/com.atproto.temp.fetchLabels"; 65 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 66 type Request<'de> = FetchLabels; 67 type Response = FetchLabelsResponse; 68}