pub struct CompactDomBuilder { /* private fields */ }Expand description
Builder for arena-based DOM construction (FastDom). Builds two parallel Vecs (hierarchy + node_data) in a single DFS pass.
Implementations§
Source§impl CompactDomBuilder
impl CompactDomBuilder
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
Sourcepub fn open_node(&mut self, node_data: NodeData)
pub fn open_node(&mut self, node_data: NodeData)
Open a new element node. Must be paired with close_node().
Sourcepub fn close_node(&mut self)
pub fn close_node(&mut self)
Close the current element. Sets the last_child pointer.
Auto Trait Implementations§
impl Freeze for CompactDomBuilder
impl RefUnwindSafe for CompactDomBuilder
impl Send for CompactDomBuilder
impl Sync for CompactDomBuilder
impl Unpin for CompactDomBuilder
impl UnsafeUnpin for CompactDomBuilder
impl UnwindSafe for CompactDomBuilder
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