pub struct DocBlock {
pub kind: String,
pub fields: Vec<(String, DocScalar)>,
pub children: Vec<DocBlock>,
pub loc: Loc,
}Expand description
v2.53.0 — one block in a document body. A generic-but-closed node: kind
is validated against the target’s vocabulary, fields against the kind’s
allowed set, and children are nested blocks (a section holds paras; a
slide holds bullets; a sheet holds rows). Keeping the node generic
(rather than one struct per block kind) keeps the grammar/IR small while the
checker (check_document) enforces the same closed-catalog discipline.
Fields§
§kind: Stringsection|heading|para|table|chart|image|toc|page_break|footnote|slide| placeholder|bullets|notes|sheet|row|formula|range|format — validated
per target at check time.
fields: Vec<(String, DocScalar)>Scalar/list fields (text:, columns:, range:, attribute:, …).
children: Vec<DocBlock>Nested child blocks.
loc: LocImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocBlock
impl RefUnwindSafe for DocBlock
impl Send for DocBlock
impl Sync for DocBlock
impl Unpin for DocBlock
impl UnsafeUnpin for DocBlock
impl UnwindSafe for DocBlock
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