pub struct LeafSpec {
pub kind: BlockKind,
pub config: Option<LeafConfig>,
pub description: Option<String>,
}Expand description
A content leaf: the structural kind-gate (checked by the structure plane) plus the
typed config the content plane interprets.
Fields§
§kind: BlockKindthe block kind that fills the leaf
config: Option<LeafConfig>the leaf’s content config; None = kind-gate only (no data checks)
description: Option<String>the leaf’s description:, carried for Finding.hint
Implementations§
Source§impl LeafSpec
impl LeafSpec
Sourcepub fn table_with(config: TableConfig) -> Self
pub fn table_with(config: TableConfig) -> Self
A table leaf with content checks — the TS table({...}).
Sourcepub fn list_with(config: ListConfig) -> Self
pub fn list_with(config: ListConfig) -> Self
A list leaf with content checks — the TS list({...}).
Sourcepub fn code_with(config: CodeConfig) -> Self
pub fn code_with(config: CodeConfig) -> Self
A code leaf pinned to a language — the TS code({ lang }).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LeafSpec
impl RefUnwindSafe for LeafSpec
impl Send for LeafSpec
impl Sync for LeafSpec
impl Unpin for LeafSpec
impl UnsafeUnpin for LeafSpec
impl UnwindSafe for LeafSpec
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