A better Rust ATProto crate
at main 1.9 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 jacquard_derive::IntoStatic 17)] 18#[builder(start_fn = new)] 19#[serde(rename_all = "camelCase")] 20pub struct GetPreferences {} 21#[jacquard_derive::lexicon] 22#[derive( 23 serde::Serialize, 24 serde::Deserialize, 25 Debug, 26 Clone, 27 PartialEq, 28 Eq, 29 jacquard_derive::IntoStatic 30)] 31#[serde(rename_all = "camelCase")] 32pub struct GetPreferencesOutput<'a> { 33 #[serde(borrow)] 34 pub preferences: crate::app_bsky::notification::Preferences<'a>, 35} 36 37///Response type for 38///app.bsky.notification.getPreferences 39pub struct GetPreferencesResponse; 40impl jacquard_common::xrpc::XrpcResp for GetPreferencesResponse { 41 const NSID: &'static str = "app.bsky.notification.getPreferences"; 42 const ENCODING: &'static str = "application/json"; 43 type Output<'de> = GetPreferencesOutput<'de>; 44 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 45} 46 47impl jacquard_common::xrpc::XrpcRequest for GetPreferences { 48 const NSID: &'static str = "app.bsky.notification.getPreferences"; 49 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 50 type Response = GetPreferencesResponse; 51} 52 53///Endpoint type for 54///app.bsky.notification.getPreferences 55pub struct GetPreferencesRequest; 56impl jacquard_common::xrpc::XrpcEndpoint for GetPreferencesRequest { 57 const PATH: &'static str = "/xrpc/app.bsky.notification.getPreferences"; 58 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 59 type Request<'de> = GetPreferences; 60 type Response = GetPreferencesResponse; 61}