A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.graph.list 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. 9#[jacquard_derive::lexicon] 10#[derive( 11 serde::Serialize, 12 serde::Deserialize, 13 Debug, 14 Clone, 15 PartialEq, 16 Eq, 17 jacquard_derive::IntoStatic 18)] 19#[serde(rename_all = "camelCase")] 20pub struct List<'a> { 21 #[serde(skip_serializing_if = "std::option::Option::is_none")] 22 #[serde(borrow)] 23 pub avatar: std::option::Option<jacquard_common::types::blob::Blob<'a>>, 24 pub created_at: jacquard_common::types::string::Datetime, 25 #[serde(skip_serializing_if = "std::option::Option::is_none")] 26 #[serde(borrow)] 27 pub description: std::option::Option<jacquard_common::CowStr<'a>>, 28 #[serde(skip_serializing_if = "std::option::Option::is_none")] 29 #[serde(borrow)] 30 pub description_facets: std::option::Option< 31 Vec<crate::app_bsky::richtext::facet::Facet<'a>>, 32 >, 33 #[serde(skip_serializing_if = "std::option::Option::is_none")] 34 #[serde(borrow)] 35 pub labels: std::option::Option<ListRecordLabels<'a>>, 36 ///Display name for list; can not be empty. 37 #[serde(borrow)] 38 pub name: jacquard_common::CowStr<'a>, 39 ///Defines the purpose of the list (aka, moderation-oriented or curration-oriented) 40 #[serde(borrow)] 41 pub purpose: crate::app_bsky::graph::ListPurpose<'a>, 42} 43 44#[jacquard_derive::open_union] 45#[derive( 46 serde::Serialize, 47 serde::Deserialize, 48 Debug, 49 Clone, 50 PartialEq, 51 Eq, 52 jacquard_derive::IntoStatic 53)] 54#[serde(tag = "$type")] 55#[serde(bound(deserialize = "'de: 'a"))] 56pub enum ListRecordLabels<'a> { 57 #[serde(rename = "com.atproto.label.defs#selfLabels")] 58 DefsSelfLabels(Box<crate::com_atproto::label::SelfLabels<'a>>), 59} 60 61impl jacquard_common::types::collection::Collection for List<'_> { 62 const NSID: &'static str = "app.bsky.graph.list"; 63}