Something went wrong. Try again.
atproto made easy crates.io/crates/jacquard
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687// @generated by jacquard-lexicon. DO NOT EDIT.//// Lexicon: pub.leaflet.blocks.code//// This file was automatically generated from Lexicon schemas.// Any manual changes will be overwritten on the next regeneration.
use jacquard_common::CowStr;
#[allow(unused_imports)]use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;use jacquard_derive::{IntoStatic, lexicon};use jacquard_lexicon::lexicon::LexiconDoc;use jacquard_lexicon::schema::LexiconSchema;
#[allow(unused_imports)]use jacquard_lexicon::validation::{ConstraintError, ValidationPath};use serde::{Serialize, Deserialize};
#[lexicon]#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]#[serde(rename_all = "camelCase")]pub struct Code<'a> { #[serde(skip_serializing_if = "Option::is_none")] #[serde(borrow)] pub language: Option<CowStr<'a>>, #[serde(borrow)] pub plaintext: CowStr<'a>, #[serde(skip_serializing_if = "Option::is_none")] #[serde(borrow)] pub syntax_highlighting_theme: Option<CowStr<'a>>,}
impl<'a> LexiconSchema for Code<'a> { fn nsid() -> &'static str { "pub.leaflet.blocks.code" } fn def_name() -> &'static str { "main" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_pub_leaflet_blocks_code() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) }}
fn lexicon_doc_pub_leaflet_blocks_code() -> LexiconDoc<'static> { #[allow(unused_imports)] use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; use jacquard_lexicon::lexicon::*; use alloc::collections::BTreeMap; LexiconDoc { lexicon: Lexicon::Lexicon1, id: CowStr::new_static("pub.leaflet.blocks.code"), defs: { let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("main"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("plaintext")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("language"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("plaintext"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("syntaxHighlightingTheme"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map }, ..Default::default() }}