pub enum StructuredNode {
Object(BTreeMap<String, StructuredNode>),
Array(Vec<StructuredArrayEntry>),
Text(Box<dyn TextGeneratorNode>),
Number(CopperlaceNumber),
Boolean(bool),
Null,
}Expand description
Compiled structured document tree.
Text leaves reuse the same text-generation nodes as existing string render APIs. Arrays and objects remain structural here even when equivalent top-level entries are also indexed as text choice rules for compatibility.
Variants§
Object(BTreeMap<String, StructuredNode>)
Object entries keyed by field name.
Array(Vec<StructuredArrayEntry>)
Array entries in source order.
Text(Box<dyn TextGeneratorNode>)
A text-generating template leaf.
Number(CopperlaceNumber)
Numeric scalar.
Boolean(bool)
Boolean scalar.
Null
Null scalar.
Trait Implementations§
Source§impl From<StructuredNode> for StructuredArrayEntry
impl From<StructuredNode> for StructuredArrayEntry
Source§fn from(value: StructuredNode) -> Self
fn from(value: StructuredNode) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for StructuredNode
impl !Send for StructuredNode
impl !Sync for StructuredNode
impl !UnwindSafe for StructuredNode
impl Freeze for StructuredNode
impl Unpin for StructuredNode
impl UnsafeUnpin for StructuredNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more