pub struct FlatNode {
pub id: NodeId,
pub parent: Option<NodeId>,
pub first_child: Option<NodeId>,
pub next_sibling: Option<NodeId>,
pub span: Range<usize>,
pub content_span: Option<Range<usize>>,
pub level: Option<u32>,
pub kind: String,
pub text: Option<String>,
pub destination: Option<String>,
}Expand description
One node of an Editor::nodes snapshot — the flat AST arena as owned Rust
data (the JSON-free read path). id indexes the snapshot; parent,
first_child, and next_sibling link the tree (None where absent).
text is the node’s primary payload (a str’s bytes, a code_block’s
body, …) and destination a link/image target, each None when the kind
carries no such payload.
Fields§
§id: NodeId§parent: Option<NodeId>§first_child: Option<NodeId>§next_sibling: Option<NodeId>§span: Range<usize>§content_span: Option<Range<usize>>§level: Option<u32>A heading’s level; None for every other kind.
kind: String§text: Option<String>§destination: Option<String>Trait Implementations§
impl Eq for FlatNode
impl StructuralPartialEq for FlatNode
Auto Trait Implementations§
impl Freeze for FlatNode
impl RefUnwindSafe for FlatNode
impl Send for FlatNode
impl Sync for FlatNode
impl Unpin for FlatNode
impl UnsafeUnpin for FlatNode
impl UnwindSafe for FlatNode
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