tangled.org trending bluesky account
1// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
2//!A collection of known record types.
3#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
4#[serde(tag = "$type")]
5pub enum KnownRecord {
6 #[serde(rename = "sh.tangled.feed.star")]
7 ShTangledFeedStar(Box<crate::sh::tangled::feed::star::Record>),
8 #[serde(rename = "sh.tangled.repo")]
9 ShTangledRepo(Box<crate::sh::tangled::repo::Record>),
10 #[serde(rename = "xyz.statusphere.status")]
11 XyzStatusphereStatus(Box<crate::xyz::statusphere::status::Record>),
12}
13impl From<crate::sh::tangled::feed::star::Record> for KnownRecord {
14 fn from(record: crate::sh::tangled::feed::star::Record) -> Self {
15 KnownRecord::ShTangledFeedStar(Box::new(record))
16 }
17}
18impl From<crate::sh::tangled::feed::star::RecordData> for KnownRecord {
19 fn from(record_data: crate::sh::tangled::feed::star::RecordData) -> Self {
20 KnownRecord::ShTangledFeedStar(Box::new(record_data.into()))
21 }
22}
23impl From<crate::sh::tangled::repo::Record> for KnownRecord {
24 fn from(record: crate::sh::tangled::repo::Record) -> Self {
25 KnownRecord::ShTangledRepo(Box::new(record))
26 }
27}
28impl From<crate::sh::tangled::repo::RecordData> for KnownRecord {
29 fn from(record_data: crate::sh::tangled::repo::RecordData) -> Self {
30 KnownRecord::ShTangledRepo(Box::new(record_data.into()))
31 }
32}
33impl From<crate::xyz::statusphere::status::Record> for KnownRecord {
34 fn from(record: crate::xyz::statusphere::status::Record) -> Self {
35 KnownRecord::XyzStatusphereStatus(Box::new(record))
36 }
37}
38impl From<crate::xyz::statusphere::status::RecordData> for KnownRecord {
39 fn from(record_data: crate::xyz::statusphere::status::RecordData) -> Self {
40 KnownRecord::XyzStatusphereStatus(Box::new(record_data.into()))
41 }
42}
43impl Into<atrium_api::types::Unknown> for KnownRecord {
44 fn into(self) -> atrium_api::types::Unknown {
45 atrium_api::types::TryIntoUnknown::try_into_unknown(&self).unwrap()
46 }
47}