A better Rust ATProto crate
at oauth 2.4 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.feed.postgate 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///Disables embedding of this post. 9#[jacquard_derive::lexicon] 10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 11#[serde(rename_all = "camelCase")] 12pub struct DisableRule<'a> {} 13impl jacquard_common::IntoStatic for DisableRule<'_> { 14 type Output = DisableRule<'static>; 15 fn into_static(self) -> Self::Output { 16 DisableRule { 17 extra_data: self.extra_data.into_static(), 18 } 19 } 20} 21 22///Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. 23#[jacquard_derive::lexicon] 24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 25#[serde(rename_all = "camelCase")] 26pub struct Postgate<'a> { 27 pub created_at: jacquard_common::types::string::Datetime, 28 ///List of AT-URIs embedding this post that the author has detached from. 29 #[serde(skip_serializing_if = "std::option::Option::is_none")] 30 #[serde(borrow)] 31 pub detached_embedding_uris: std::option::Option< 32 Vec<jacquard_common::types::string::AtUri<'a>>, 33 >, 34 ///List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. 35 #[serde(skip_serializing_if = "std::option::Option::is_none")] 36 #[serde(borrow)] 37 pub embedding_rules: std::option::Option< 38 Vec<jacquard_common::types::value::Data<'a>>, 39 >, 40 ///Reference (AT-URI) to the post record. 41 #[serde(borrow)] 42 pub post: jacquard_common::types::string::AtUri<'a>, 43} 44 45impl jacquard_common::types::collection::Collection for Postgate<'_> { 46 const NSID: &'static str = "app.bsky.feed.postgate"; 47} 48 49impl jacquard_common::IntoStatic for Postgate<'_> { 50 type Output = Postgate<'static>; 51 fn into_static(self) -> Self::Output { 52 Postgate { 53 created_at: self.created_at.into_static(), 54 detached_embedding_uris: self.detached_embedding_uris.into_static(), 55 embedding_rules: self.embedding_rules.into_static(), 56 post: self.post.into_static(), 57 extra_data: self.extra_data.into_static(), 58 } 59 } 60}