pub struct UnknownNode {
pub kind: String,
pub id: Option<String>,
pub unknown_props: BTreeMap<String, UnknownProperty>,
pub children: Vec<Node>,
pub source_span: Option<Span>,
}Expand description
An unrecognized node kind, preserved for forward-compat.
When a .zen document contains a node kind that this binary does not
recognise (e.g. authored with a newer version), the node is wrapped in this
variant instead of triggering a hard error.
Fields§
§kind: StringThe KDL node name (e.g. "sparkle", "table", "chart").
id: Option<String>The node’s id attribute, if present. Captured first-class so unknown
nodes are addressable and participate in duplicate-id detection.
unknown_props: BTreeMap<String, UnknownProperty>All other attributes, preserved with typed values + annotations.
children: Vec<Node>Child nodes (may be known OR unknown), preserved for lossless round-trip.
source_span: Option<Span>Source declaration span, when available.
Trait Implementations§
Source§impl Clone for UnknownNode
impl Clone for UnknownNode
Source§fn clone(&self) -> UnknownNode
fn clone(&self) -> UnknownNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnknownNode
impl Debug for UnknownNode
Source§impl PartialEq for UnknownNode
impl PartialEq for UnknownNode
Source§fn eq(&self, other: &UnknownNode) -> bool
fn eq(&self, other: &UnknownNode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UnknownNode
Auto Trait Implementations§
impl Freeze for UnknownNode
impl RefUnwindSafe for UnknownNode
impl Send for UnknownNode
impl Sync for UnknownNode
impl Unpin for UnknownNode
impl UnsafeUnpin for UnknownNode
impl UnwindSafe for UnknownNode
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