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() -> CompactDomBuilder
pub fn with_capacity(cap: usize) -> CompactDomBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more