pub struct DocumentNode {
pub id: String,
pub content: NodeContent,
pub parent: Option<u32>,
pub children: Vec<u32>,
pub annotations: Vec<TextAnnotation>,
pub attributes: Option<HashMap<String, String>>,
}Expand description
A single node in the document tree.
Fields§
§id: StringDeterministic node identifier.
content: NodeContentThe semantic content of this node.
parent: Option<u32>Index of the parent node (None for root nodes).
children: Vec<u32>Indices of child nodes in reading order.
annotations: Vec<TextAnnotation>Inline formatting annotations (bold, italic, links, etc.) with byte offsets into the text.
attributes: Option<HashMap<String, String>>Format-specific attributes (e.g. class, id, data-* attributes).
Trait Implementations§
Source§impl Clone for DocumentNode
impl Clone for DocumentNode
Source§fn clone(&self) -> DocumentNode
fn clone(&self) -> DocumentNode
Returns a duplicate of the value. Read more
1.0.0 · 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 DocumentNode
impl Debug for DocumentNode
Source§impl<'de> Deserialize<'de> for DocumentNode
impl<'de> Deserialize<'de> for DocumentNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DocumentNode
impl PartialEq for DocumentNode
Source§impl Serialize for DocumentNode
impl Serialize for DocumentNode
impl Eq for DocumentNode
impl StructuralPartialEq for DocumentNode
Auto Trait Implementations§
impl Freeze for DocumentNode
impl RefUnwindSafe for DocumentNode
impl Send for DocumentNode
impl Sync for DocumentNode
impl Unpin for DocumentNode
impl UnsafeUnpin for DocumentNode
impl UnwindSafe for DocumentNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.