A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: tools.ozone.set.upsertSet 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 UpsertSet<'a> { 21 #[serde(flatten)] 22 #[serde(borrow)] 23 pub value: crate::tools_ozone::set::Set<'a>, 24 #[serde(flatten)] 25 #[serde(borrow)] 26 #[builder(default)] 27 pub extra_data: ::std::collections::BTreeMap< 28 ::jacquard_common::smol_str::SmolStr, 29 ::jacquard_common::types::value::Data<'a>, 30 >, 31} 32 33impl jacquard_common::IntoStatic for UpsertSet<'_> { 34 type Output = UpsertSet<'static>; 35 fn into_static(self) -> Self::Output { 36 UpsertSet { 37 value: self.value.into_static(), 38 extra_data: self.extra_data.into_static(), 39 } 40 } 41} 42 43#[jacquard_derive::lexicon] 44#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 45#[serde(rename_all = "camelCase")] 46pub struct UpsertSetOutput<'a> { 47 #[serde(flatten)] 48 #[serde(borrow)] 49 pub value: crate::tools_ozone::set::SetView<'a>, 50} 51 52impl jacquard_common::IntoStatic for UpsertSetOutput<'_> { 53 type Output = UpsertSetOutput<'static>; 54 fn into_static(self) -> Self::Output { 55 UpsertSetOutput { 56 value: self.value.into_static(), 57 extra_data: self.extra_data.into_static(), 58 } 59 } 60} 61 62impl jacquard_common::types::xrpc::XrpcRequest for UpsertSet<'_> { 63 const NSID: &'static str = "tools.ozone.set.upsertSet"; 64 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( 65 "application/json", 66 ); 67 const OUTPUT_ENCODING: &'static str = "application/json"; 68 type Output<'de> = UpsertSetOutput<'de>; 69 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 70}