A better Rust ATProto crate
at oauth 1.5 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.notification.putPreferences 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8#[jacquard_derive::lexicon] 9#[derive( 10 serde::Serialize, 11 serde::Deserialize, 12 Debug, 13 Clone, 14 PartialEq, 15 Eq, 16 bon::Builder 17)] 18#[serde(rename_all = "camelCase")] 19#[builder(start_fn = new)] 20pub struct PutPreferences<'a> { 21 pub priority: bool, 22 #[serde(flatten)] 23 #[serde(borrow)] 24 #[builder(default)] 25 pub extra_data: ::std::collections::BTreeMap< 26 ::jacquard_common::smol_str::SmolStr, 27 ::jacquard_common::types::value::Data<'a>, 28 >, 29} 30 31impl jacquard_common::IntoStatic for PutPreferences<'_> { 32 type Output = PutPreferences<'static>; 33 fn into_static(self) -> Self::Output { 34 PutPreferences { 35 priority: self.priority.into_static(), 36 extra_data: self.extra_data.into_static(), 37 } 38 } 39} 40 41impl jacquard_common::types::xrpc::XrpcRequest for PutPreferences<'_> { 42 const NSID: &'static str = "app.bsky.notification.putPreferences"; 43 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( 44 "application/json", 45 ); 46 const OUTPUT_ENCODING: &'static str = "application/json"; 47 type Output<'de> = (); 48 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 49}