Crates.io | generational-arena-dom |
lib.rs | generational-arena-dom |
version | 0.1.0 |
source | src |
created_at | 2023-07-09 01:15:43.970303 |
updated_at | 2023-07-09 01:15:43.970303 |
description | A DOM implementation for html5ever that uses generational-arenas. |
homepage | |
repository | https://github.com/ethanhs/generational-arena-dom |
max_upload_size | |
id | 911770 |
size | 14,936 |
This is an implementation of the DOM used in html5ever
using generational_indextree
, an implementation of indextree using generational arenas.
Using an indextree for the DOM makes mutation much simpler, as the docs for indextree state:
This arena tree structure is using just a single Vec and numerical identifiers (indices in the vector) instead of reference counted pointers like. This means there is no RefCell and mutability is handled in a way much more idiomatic to Rust through unique (&mut) access to the arena.
However, indextree suffers from the ABA problem, which we can solve via using generational-arenas instead of Vec
based arenas.