A better Rust ATProto crate
at oauth 1.6 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.notification.getPreferences 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 GetPreferences {} 20impl jacquard_common::IntoStatic for GetPreferences { 21 type Output = GetPreferences; 22 fn into_static(self) -> Self::Output { 23 self 24 } 25} 26 27#[jacquard_derive::lexicon] 28#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 29#[serde(rename_all = "camelCase")] 30pub struct GetPreferencesOutput<'a> { 31 #[serde(borrow)] 32 pub preferences: crate::app_bsky::notification::Preferences<'a>, 33} 34 35impl jacquard_common::IntoStatic for GetPreferencesOutput<'_> { 36 type Output = GetPreferencesOutput<'static>; 37 fn into_static(self) -> Self::Output { 38 GetPreferencesOutput { 39 preferences: self.preferences.into_static(), 40 extra_data: self.extra_data.into_static(), 41 } 42 } 43} 44 45impl jacquard_common::types::xrpc::XrpcRequest for GetPreferences { 46 const NSID: &'static str = "app.bsky.notification.getPreferences"; 47 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; 48 const OUTPUT_ENCODING: &'static str = "application/json"; 49 type Output<'de> = GetPreferencesOutput<'de>; 50 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 51}