Learn how to use Rust to build ATProto powered applications
at main 1.1 kB view raw
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 = "xyz.statusphere.status")] 7 LexiconsXyzStatusphereStatus(Box<crate::lexicons::xyz::statusphere::status::Record>), 8} 9impl From<crate::lexicons::xyz::statusphere::status::Record> for KnownRecord { 10 fn from(record: crate::lexicons::xyz::statusphere::status::Record) -> Self { 11 KnownRecord::LexiconsXyzStatusphereStatus(Box::new(record)) 12 } 13} 14impl From<crate::lexicons::xyz::statusphere::status::RecordData> for KnownRecord { 15 fn from(record_data: crate::lexicons::xyz::statusphere::status::RecordData) -> Self { 16 KnownRecord::LexiconsXyzStatusphereStatus(Box::new(record_data.into())) 17 } 18} 19impl Into<atrium_api::types::Unknown> for KnownRecord { 20 fn into(self) -> atrium_api::types::Unknown { 21 atrium_api::types::TryIntoUnknown::try_into_unknown(&self).unwrap() 22 } 23}