A better Rust ATProto crate
at oauth 2.2 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: tools.ozone.communication.defs 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod create_template; 9pub mod delete_template; 10pub mod list_templates; 11pub mod update_template; 12 13#[jacquard_derive::lexicon] 14#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 15#[serde(rename_all = "camelCase")] 16pub struct TemplateView<'a> { 17 ///Subject of the message, used in emails. 18 #[serde(borrow)] 19 pub content_markdown: jacquard_common::CowStr<'a>, 20 pub created_at: jacquard_common::types::string::Datetime, 21 pub disabled: bool, 22 #[serde(borrow)] 23 pub id: jacquard_common::CowStr<'a>, 24 ///Message language. 25 #[serde(skip_serializing_if = "std::option::Option::is_none")] 26 pub lang: std::option::Option<jacquard_common::types::string::Language>, 27 ///DID of the user who last updated the template. 28 #[serde(borrow)] 29 pub last_updated_by: jacquard_common::types::string::Did<'a>, 30 ///Name of the template. 31 #[serde(borrow)] 32 pub name: jacquard_common::CowStr<'a>, 33 ///Content of the template, can contain markdown and variable placeholders. 34 #[serde(skip_serializing_if = "std::option::Option::is_none")] 35 #[serde(borrow)] 36 pub subject: std::option::Option<jacquard_common::CowStr<'a>>, 37 pub updated_at: jacquard_common::types::string::Datetime, 38} 39 40impl jacquard_common::IntoStatic for TemplateView<'_> { 41 type Output = TemplateView<'static>; 42 fn into_static(self) -> Self::Output { 43 TemplateView { 44 content_markdown: self.content_markdown.into_static(), 45 created_at: self.created_at.into_static(), 46 disabled: self.disabled.into_static(), 47 id: self.id.into_static(), 48 lang: self.lang.into_static(), 49 last_updated_by: self.last_updated_by.into_static(), 50 name: self.name.into_static(), 51 subject: self.subject.into_static(), 52 updated_at: self.updated_at.into_static(), 53 extra_data: self.extra_data.into_static(), 54 } 55 } 56}