diff --git a/crates/errors.txt b/crates/errors.txt new file mode 100644 index 000000000..484dfb35e --- /dev/null +++ b/crates/errors.txt @@ -0,0 +1,5356 @@ +error[E0433]: failed to resolve: could not find `macos_render_tree` in `gosub_rendering` + --> crates/gosub_bindings/src/wrapper/node.rs:1:22 + | +1 | use gosub_rendering::macos_render_tree::properties::{Position, Rectangle}; + | ^^^^^^^^^^^^^^^^^ could not find `macos_render_tree` in `gosub_rendering` + +error[E0433]: failed to resolve: could not find `macos_render_tree` in `gosub_rendering` + --> crates/gosub_bindings/src/wrapper/node.rs:2:22 + | +2 | use gosub_rendering::macos_render_tree::{text::TextNode, Node}; + | ^^^^^^^^^^^^^^^^^ could not find `macos_render_tree` in `gosub_rendering` + +error[E0433]: failed to resolve: could not find `macos_render_tree` in `gosub_rendering` + --> crates/gosub_bindings/src/wrapper/text.rs:1:22 + | +1 | use gosub_rendering::macos_render_tree::text::TextNode; + | ^^^^^^^^^^^^^^^^^ could not find `macos_render_tree` in `gosub_rendering` + +error[E0432]: unresolved import `gosub_rendering::macos_render_tree` + --> crates/gosub_bindings/src/wrapper/node.rs:2:22 + | +2 | use gosub_rendering::macos_render_tree::{text::TextNode, Node}; + | ^^^^^^^^^^^^^^^^^ could not find `macos_render_tree` in `gosub_rendering` + +error[E0432]: unresolved import `gosub_html5::parser::document` + --> crates/gosub_bindings/src/lib.rs:7:26 + | +7 | use gosub_html5::parser::document::{Document, DocumentBuilder}; + | ^^^^^^^^ could not find `document` in `parser` + +error[E0432]: unresolved import `gosub_rendering::macos_render_tree` + --> crates/gosub_bindings/src/lib.rs:9:22 + | +9 | use gosub_rendering::macos_render_tree::{Node, NodeType, RenderTree, TreeIterator}; + | ^^^^^^^^^^^^^^^^^ could not find `macos_render_tree` in `gosub_rendering` + +Some errors have detailed explanations: E0432, E0433. +For more information about an error, try `rustc --explain E0432`. +error: could not compile `gosub_bindings` (lib test) due to 6 previous errors + +running 5 tests +..... +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 96 tests +..............................................................i........................ 87/96 +......... +test result: ok. 95 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.15s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + +error[E0425]: cannot find value `document` in this scope + --> crates/gosub_html5/src/doc/document.rs:922:19 + | +922 | let res = document.insert_attribute("id", "myid", p_id, Location::default()); + | ^^^^^^^^ not found in this scope + +error[E0599]: no function or associated item named `new` found for struct `DocumentTaskQueue` in the current scope + --> crates/gosub_html5/src/doc/document.rs:734:49 + | +734 | let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); + | ^^^ function or associated item not found in `DocumentTaskQueue<_, _>` + | + ::: crates/gosub_html5/src/doc/task_queue.rs:52:1 + | +52 | pub struct DocumentTaskQueue, C: CssSystem> { + | ---------------------------------------------------------- function or associated item `new` not found for this struct + | + = help: items from traits can only be used if the trait is implemented and in scope + = note: the following traits define an item `new`, perhaps you need to implement one of them: + candidate #1: `colors_transform::Color` + candidate #2: `criterion::stats::tuple::TupledDistributionsBuilder` + candidate #3: `gosub_shared::traits::document::Document` + candidate #4: `gosub_shared::traits::document::DocumentFragment` + candidate #5: `gosub_shared::traits::html5::ParserOptions` + candidate #6: `itertools::adaptors::coalesce::CountItem` + candidate #7: `plotters::style::font::FontData` + candidate #8: `rand::distributions::uniform::UniformSampler` + candidate #9: `ring::aead::BoundKey` + +error[E0599]: no function or associated item named `new` found for struct `DocumentTaskQueue` in the current scope + --> crates/gosub_html5/src/doc/document.rs:832:49 + | +832 | let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); + | ^^^ function or associated item not found in `DocumentTaskQueue<_, _>` + | + ::: crates/gosub_html5/src/doc/task_queue.rs:52:1 + | +52 | pub struct DocumentTaskQueue, C: CssSystem> { + | ---------------------------------------------------------- function or associated item `new` not found for this struct + | + = help: items from traits can only be used if the trait is implemented and in scope + = note: the following traits define an item `new`, perhaps you need to implement one of them: + candidate #1: `colors_transform::Color` + candidate #2: `criterion::stats::tuple::TupledDistributionsBuilder` + candidate #3: `gosub_shared::traits::document::Document` + candidate #4: `gosub_shared::traits::document::DocumentFragment` + candidate #5: `gosub_shared::traits::html5::ParserOptions` + candidate #6: `itertools::adaptors::coalesce::CountItem` + candidate #7: `plotters::style::font::FontData` + candidate #8: `rand::distributions::uniform::UniformSampler` + candidate #9: `ring::aead::BoundKey` + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1000:13 + | +1000 | let NodeDataTypeInternal::Element(element) = doc_read.node_by_id(node_id).unwrap().get_element_data() else { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------------------------------------------------------- this expression has type `Option<&ElementData>` + | | + | expected `Option<&ElementData>`, found `NodeDataTypeInternal<_>` + | + = note: expected enum `Option<&ElementData>` + found enum `nodeimpl::NodeDataTypeInternal<_>` + +error[E0599]: no function or associated item named `new` found for struct `DocumentTaskQueue` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1011:49 + | +1011 | let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); + | ^^^ function or associated item not found in `DocumentTaskQueue<_, _>` + | + ::: crates/gosub_html5/src/doc/task_queue.rs:52:1 + | +52 | pub struct DocumentTaskQueue, C: CssSystem> { + | ---------------------------------------------------------- function or associated item `new` not found for this struct + | + = help: items from traits can only be used if the trait is implemented and in scope + = note: the following traits define an item `new`, perhaps you need to implement one of them: + candidate #1: `colors_transform::Color` + candidate #2: `criterion::stats::tuple::TupledDistributionsBuilder` + candidate #3: `gosub_shared::traits::document::Document` + candidate #4: `gosub_shared::traits::document::DocumentFragment` + candidate #5: `gosub_shared::traits::html5::ParserOptions` + candidate #6: `itertools::adaptors::coalesce::CountItem` + candidate #7: `plotters::style::font::FontData` + candidate #8: `rand::distributions::uniform::UniformSampler` + candidate #9: `ring::aead::BoundKey` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1028:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1028 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1028 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1037:30 + | +1037 | let res = doc_handle.insert_attribute("class", "one two three", div_id, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1043:44 + | +1043 | assert!(element.classes().contains("one")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1044:44 + | +1044 | assert!(element.classes().contains("two")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1045:44 + | +1045 | assert!(element.classes().contains("three")); + | -------- ^^^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0599]: no function or associated item named `new` found for struct `DocumentTaskQueue` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1053:49 + | +1053 | let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); + | ^^^ function or associated item not found in `DocumentTaskQueue<_, _>` + | + ::: crates/gosub_html5/src/doc/task_queue.rs:52:1 + | +52 | pub struct DocumentTaskQueue, C: CssSystem> { + | ---------------------------------------------------------- function or associated item `new` not found for this struct + | + = help: items from traits can only be used if the trait is implemented and in scope + = note: the following traits define an item `new`, perhaps you need to implement one of them: + candidate #1: `colors_transform::Color` + candidate #2: `criterion::stats::tuple::TupledDistributionsBuilder` + candidate #3: `gosub_shared::traits::document::Document` + candidate #4: `gosub_shared::traits::document::DocumentFragment` + candidate #5: `gosub_shared::traits::html5::ParserOptions` + candidate #6: `itertools::adaptors::coalesce::CountItem` + candidate #7: `plotters::style::font::FontData` + candidate #8: `rand::distributions::uniform::UniformSampler` + candidate #9: `ring::aead::BoundKey` + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1062:44 + | +1062 | assert!(element.classes().contains("one")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1063:44 + | +1063 | assert!(element.classes().contains("two")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:1064:44 + | +1064 | assert!(element.classes().contains("three")); + | -------- ^^^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1073:36 + | +1073 | let found_ids = doc_handle.query(&query); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1096:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1096 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1096 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1105:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1105 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1105 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1114:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1114 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1114 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1123:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1123 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1123 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1132:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1132 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1132 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1141:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1141 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1141 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1150:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1150 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1150 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1160:36 + | +1160 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1177:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1177 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1177 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1186:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1186 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1186 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1195:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1195 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1195 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1204:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1204 | let p_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1204 | let p_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1213:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1213 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1213 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1222:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1222 | let p_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1222 | let p_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1231:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1231 | let p_id_4 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1231 | let p_id_4 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1241:36 + | +1241 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1258:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1258 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1258 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1267:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1267 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1267 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1276:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1276 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1276 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1285:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1285 | let p_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1285 | let p_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1294:30 + | +1294 | let res = doc_handle.insert_attribute("id", "myid", p_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1297:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1297 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1297 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1306:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1306 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1306 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1315:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1315 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1315 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1325:36 + | +1325 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1342:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1342 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1342 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1351:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1351 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1351 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1360:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1360 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1360 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1369:34 + | +1369 | let mut res = doc_handle.insert_attribute("class", "one two", p_id, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1371:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1371 | let p_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1371 | let p_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1380:26 + | +1380 | res = doc_handle.insert_attribute("class", "one", p_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1382:26 + | +1382 | res = doc_handle.insert_attribute("id", "myid", p_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1385:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1385 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1385 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1394:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1394 | let p_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1394 | let p_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1403:26 + | +1403 | res = doc_handle.insert_attribute("class", "two three", p_id_3, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1406:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1406 | let p_id_4 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1406 | let p_id_4 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1415:26 + | +1415 | res = doc_handle.insert_attribute("class", "three", p_id_4, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1419:36 + | +1419 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1436:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1436 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1436 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1445:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1445 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1445 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1454:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1454 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1454 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1463:34 + | +1463 | let mut res = doc_handle.insert_attribute("class", "one two", p_id, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1465:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1465 | let p_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1465 | let p_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1474:26 + | +1474 | res = doc_handle.insert_attribute("class", "one", p_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1476:26 + | +1476 | res = doc_handle.insert_attribute("id", "myid", p_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1479:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1479 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1479 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1488:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1488 | let p_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1488 | let p_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1497:26 + | +1497 | res = doc_handle.insert_attribute("class", "two three", p_id_3, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1500:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1500 | let p_id_4 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1500 | let p_id_4 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1509:26 + | +1509 | res = doc_handle.insert_attribute("class", "three", p_id_4, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1513:36 + | +1513 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1530:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1530 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1530 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1539:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1539 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1539 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1548:34 + | +1548 | let mut res = doc_handle.insert_attribute("id", "myid", div_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1550:26 + | +1550 | res = doc_handle.insert_attribute("style", "somestyle", div_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1552:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1552 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1552 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1561:26 + | +1561 | res = doc_handle.insert_attribute("title", "key", p_id, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1563:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1563 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1563 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1572:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1572 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1572 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1581:26 + | +1581 | res = doc_handle.insert_attribute("style", "otherstyle", div_id_3, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1583:26 + | +1583 | res = doc_handle.insert_attribute("id", "otherid", div_id_3, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1585:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1585 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1585 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1594:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1594 | let p_id_4 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1594 | let p_id_4 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1603:26 + | +1603 | res = doc_handle.insert_attribute("title", "yo", p_id_4, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1605:26 + | +1605 | res = doc_handle.insert_attribute("style", "cat", p_id_4, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1609:36 + | +1609 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1626:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1626 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1626 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1635:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1635 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1635 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1644:34 + | +1644 | let mut res = doc_handle.insert_attribute("id", "myid", div_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1646:26 + | +1646 | res = doc_handle.insert_attribute("style", "somestyle", div_id_2, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1648:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1648 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1648 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1657:26 + | +1657 | res = doc_handle.insert_attribute("title", "key", p_id, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1659:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1659 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1659 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1668:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1668 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1668 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1677:26 + | +1677 | res = doc_handle.insert_attribute("style", "otherstyle", div_id_3, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1679:26 + | +1679 | res = doc_handle.insert_attribute("id", "otherid", div_id_3, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1681:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1681 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1681 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1690:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1690 | let p_id_4 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1690 | let p_id_4 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1699:26 + | +1699 | res = doc_handle.insert_attribute("title", "yo", p_id_4, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `insert_attribute` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1701:26 + | +1701 | res = doc_handle.insert_attribute("style", "cat", p_id_4, Location::default()); + | ^^^^^^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `insert_attribute`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1705:36 + | +1705 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1722:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1722 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1722 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1731:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1731 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1731 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1740:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1740 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1740 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1749:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1749 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1749 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1758:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1758 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1758 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1767:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1767 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1767 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1776:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1776 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1776 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1786:36 + | +1786 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1803:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1803 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1803 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1812:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1812 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1812 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1821:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1821 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1821 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1830:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1830 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1830 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1839:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1839 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1839 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1848:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1848 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1848 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1857:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1857 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1857 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1867:36 + | +1867 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1884:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1884 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1884 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1893:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1893 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1893 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1902:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1902 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1902 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1911:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1911 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1911 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1920:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1920 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1920 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1929:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1929 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1929 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1938:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1938 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1938 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1948:36 + | +1948 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1965:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1965 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1965 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1974:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1974 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1974 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1983:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1983 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1983 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:1992:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +1992 | let p_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +1992 | let p_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2001:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2001 | let div_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2001 | let div_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2010:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2010 | let p_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2010 | let p_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2019:27 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2019 | let _ = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2019 | let _ = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `query` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2029:36 + | +2029 | let found_ids = doc_handle.query(&query).unwrap(); + | ^^^^^ method not found in `DocumentHandle, Css3System>` + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2044:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2044 | let div_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2044 | let div_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2053:34 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2053 | let div_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2053 | let div_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2062:30 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2062 | let p_id = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2062 | let p_id = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `create_text` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2071:34 + | +2071 | let text_id = doc_handle.create_text("first p tag", p_id, Location::default()); + | ^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `create_text`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2072:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2072 | let p_id_2 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2072 | let p_id_2 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `create_text` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2081:36 + | +2081 | let text_id_2 = doc_handle.create_text("second p tag", p_id_2, Location::default()); + | ^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `create_text`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `new_element` found for struct `doc::document::DocumentImpl` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2082:32 + | +32 | pub struct DocumentImpl { + | ------------------------------------- function or associated item `new_element` not found for this struct +... +2082 | let p_id_3 = Document::new_element( + | ^^^^^^^^^^^ function or associated item not found in `DocumentImpl` + | +help: there is an associated function `new_element_node` with a similar name + | +2082 | let p_id_3 = Document::new_element_node( + | ~~~~~~~~~~~~~~~~ + +error[E0599]: no method named `create_text` found for struct `gosub_shared::document::DocumentHandle` in the current scope + --> crates/gosub_html5/src/doc/document.rs:2091:36 + | +2091 | let text_id_3 = doc_handle.create_text("third p tag", p_id_3, Location::default()); + | ^^^^^^^^^^^ method not found in `DocumentHandle, Css3System>` + | + = help: items from traits can only be used if the trait is implemented and in scope +note: `TreeBuilder` defines an item `create_text`, perhaps you need to implement it + --> crates/gosub_html5/src/parser/tree_builder.rs:9:1 + | +9 | pub trait TreeBuilder { + | ^^^^^^^^^^^^^^^^^^^^^ + +error[E0308]: arguments to this function are incorrect + --> crates/gosub_html5/src/doc/document.rs:2137:13 + | +2137 | Document::new_element_node(doc_handle.clone(), "div_1", HTML_NAMESPACE, None, Location::default()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -------------- ---- an argument of type `std::collections::HashMap` is missing + | | + | unexpected argument of type `&'static str` + | +note: associated function defined here + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/document.rs:104:8 + | +104 | fn new_element_node( + | ^^^^^^^^^^^^^^^^ +help: did you mean + | +2137 | Document::new_element_node(doc_handle.clone(), "div_1", None, /* std::collections::HashMap */, Location::default()); + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:2139:46 + | +2139 | assert_eq!(current_node_id.unwrap(), div_id); + | ^^^^^^ expected `NodeId`, found `NodeImpl` + | + = note: expected struct `gosub_shared::node::NodeId` + found struct `nodeimpl::NodeImpl` + +error[E0308]: mismatched types + --> crates/gosub_html5/src/doc/document.rs:2143:46 + | +2143 | assert_eq!(current_node_id.unwrap(), div_id_2); + | ^^^^^^^^ expected `NodeId`, found `NodeImpl` + | + = note: expected struct `gosub_shared::node::NodeId` + found struct `nodeimpl::NodeImpl` + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:96:23 + | +96 | let mut doc = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +96 | let mut doc = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/arena.rs:96:33 + | +96 | let mut doc = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/arena.rs:98:20 + | +98 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:98:20 + | +98 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +98 | let node = ::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:110:23 + | +110 | let mut doc = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +110 | let mut doc = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/arena.rs:110:33 + | +110 | let mut doc = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/arena.rs:112:20 + | +112 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:112:20 + | +112 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +112 | let node = ::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0423]: cannot initialize a tuple struct which contains private fields + --> crates/gosub_html5/src/node/arena.rs:116:44 + | +116 | let node = document.get_node_by_id(NodeId(0)).unwrap().to_owned(); + | ^^^^^^ + | +note: constructor is not visible here due to private fields + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/node.rs:5:19 + | +5 | pub struct NodeId(usize); + | ^^^^^ private field +help: you might have meant to use the `root` associated function + | +116 | let node = document.get_node_by_id(NodeId::root()).unwrap().to_owned(); + | ~~~~~~~~ + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:122:23 + | +122 | let mut doc = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +122 | let mut doc = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/arena.rs:122:33 + | +122 | let mut doc = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/arena.rs:123:20 + | +123 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:123:20 + | +123 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +123 | let node = ::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:134:23 + | +134 | let mut doc = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +134 | let mut doc = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/arena.rs:134:33 + | +134 | let mut doc = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/arena.rs:135:20 + | +135 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:135:20 + | +135 | let node = Node::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +135 | let node = ::new_element(&doc, "test", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:147:23 + | +147 | let mut doc = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +147 | let mut doc = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/arena.rs:147:33 + | +147 | let mut doc = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/arena.rs:149:22 + | +149 | let parent = Node::new_element(&doc, "parent", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:149:22 + | +149 | let parent = Node::new_element(&doc, "parent", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +149 | let parent = ::new_element(&doc, "parent", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/arena.rs:150:21 + | +150 | let child = Node::new_element(&doc, "child", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/arena.rs:150:21 + | +150 | let child = Node::new_element(&doc, "child", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +150 | let child = ::new_element(&doc, "child", HashMap::new(), HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:319:24 + | +319 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +319 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:319:34 + | +319 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:320:20 + | +320 | let node = Node::new_document(&document, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:320:20 + | +320 | let node = Node::new_document(&document, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +320 | let node = ::new_document(&document, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:336:24 + | +336 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +336 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:336:34 + | +336 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:337:20 + | +337 | let node = Node::new_element( + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:337:20 + | +337 | let node = Node::new_element( + | ^^^^ + | +help: add `dyn` keyword before this trait + | +337 | let node = ::new_element( + | ++++ + + +error[E0282]: type annotations needed + --> crates/gosub_html5/src/node/nodeimpl.rs:352:28 + | +352 | assert_eq!(element.name(), "div"); + | ^^^^ cannot infer type + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:359:24 + | +359 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +359 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:359:34 + | +359 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:360:20 + | +360 | let node = Node::new_comment(&document, Location::default(), "test"); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:360:20 + | +360 | let node = Node::new_comment(&document, Location::default(), "test"); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +360 | let node = ::new_comment(&document, Location::default(), "test"); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:374:24 + | +374 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +374 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:374:34 + | +374 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:375:20 + | +375 | let node = Node::new_text(&document, Location::default(), "test"); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:375:20 + | +375 | let node = Node::new_text(&document, Location::default(), "test"); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +375 | let node = ::new_text(&document, Location::default(), "test"); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:391:24 + | +391 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +391 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:391:34 + | +391 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:392:20 + | +392 | let node = Node::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:392:20 + | +392 | let node = Node::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +392 | let node = ::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:398:24 + | +398 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +398 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:398:34 + | +398 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:399:20 + | +399 | let node = Node::new_document(&document, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:399:20 + | +399 | let node = Node::new_document(&document, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +399 | let node = ::new_document(&document, Location::default()); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:401:20 + | +401 | let node = Node::new_text(&document, Location::default(), "test"); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:401:20 + | +401 | let node = Node::new_text(&document, Location::default(), "test"); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +401 | let node = ::new_text(&document, Location::default(), "test"); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:403:20 + | +403 | let node = Node::new_comment(&document, Location::default(), "test"); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:403:20 + | +403 | let node = Node::new_comment(&document, Location::default(), "test"); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +403 | let node = ::new_comment(&document, Location::default(), "test"); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:407:20 + | +407 | let node = Node::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:407:20 + | +407 | let node = Node::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +407 | let node = ::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:413:24 + | +413 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +413 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:413:34 + | +413 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:418:24 + | +418 | let node = Node::new_element(&document, element, attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:418:24 + | +418 | let node = Node::new_element(&document, element, attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +418 | let node = ::new_element(&document, element, attributes, HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:425:24 + | +425 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +425 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:425:34 + | +425 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:429:24 + | +429 | let node = Node::new_element(&document, element, attributes, MATHML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:429:24 + | +429 | let node = Node::new_element(&document, element, attributes, MATHML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +429 | let node = ::new_element(&document, element, attributes, MATHML_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:436:24 + | +436 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +436 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:436:34 + | +436 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:440:24 + | +440 | let node = Node::new_element(&document, element, attributes, SVG_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:440:24 + | +440 | let node = Node::new_element(&document, element, attributes, SVG_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +440 | let node = ::new_element(&document, element, attributes, SVG_NAMESPACE, Location::default()); + | ++++ + + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:447:24 + | +447 | let document = Document::shared(None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +447 | let document = ::shared(None); + | ++++ + + +error[E0599]: no function or associated item named `shared` found for trait `gosub_shared::traits::document::Document<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:447:34 + | +447 | let document = Document::shared(None); + | ^^^^^^ function or associated item not found in `Document<_>` + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:448:20 + | +448 | let node = Node::new_document(&document, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:448:20 + | +448 | let node = Node::new_document(&document, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +448 | let node = ::new_document(&document, Location::default()); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:450:20 + | +450 | let node = Node::new_text(&document, Location::default(), "test"); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:450:20 + | +450 | let node = Node::new_text(&document, Location::default(), "test"); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +450 | let node = ::new_text(&document, Location::default(), "test"); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:452:20 + | +452 | let node = Node::new_comment(&document, Location::default(), "test"); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:452:20 + | +452 | let node = Node::new_comment(&document, Location::default(), "test"); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +452 | let node = ::new_comment(&document, Location::default(), "test"); + | ++++ + + +error[E0038]: the trait `gosub_shared::traits::node::Node` cannot be made into an object + --> crates/gosub_html5/src/node/nodeimpl.rs:456:20 + | +456 | let node = Node::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ `gosub_shared::traits::node::Node` cannot be made into an object + | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_shared/src/traits/node.rs:104:39 + | +104 | pub trait Node: Clone + PartialEq { + | ^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::node::Node` for this new enum and using it instead: + gosub_html5::node::nodeimpl::NodeImpl + node::nodeimpl::NodeImpl + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/node/nodeimpl.rs:456:20 + | +456 | let node = Node::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ^^^^ + | +help: add `dyn` keyword before this trait + | +456 | let node = ::new_element(&document, "div", attributes, HTML_NAMESPACE, Location::default()); + | ++++ + + +error[E0283]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser/quirks.rs:167:13 + | +167 | let parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^ ---------------------------------------------------- type must be known at this point + | + = note: cannot satisfy `_: gosub_shared::traits::document::Document<_>` + = help: the following types implement trait `gosub_shared::traits::document::Document`: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl +note: required by a bound in `parser::Html5Parser::<'chars, D, C>::new_parser` + --> crates/gosub_html5/src/parser.rs:270:8 + | +270 | D: Document, + | ^^^^^^^^^^^ required by this bound in `Html5Parser::<'chars, D, C>::new_parser` +... +318 | pub fn new_parser(stream: &'chars mut ByteStream, start_location: Location) -> Self { + | ---------- required by a bound in this associated function +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +167 | let parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0283]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser/quirks.rs:253:13 + | +253 | let parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^ ---------------------------------------------------- type must be known at this point + | + = note: cannot satisfy `_: gosub_shared::traits::document::Document<_>` + = help: the following types implement trait `gosub_shared::traits::document::Document`: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl +note: required by a bound in `parser::Html5Parser::<'chars, D, C>::new_parser` + --> crates/gosub_html5/src/parser.rs:270:8 + | +270 | D: Document, + | ^^^^^^^^^^^ required by this bound in `Html5Parser::<'chars, D, C>::new_parser` +... +318 | pub fn new_parser(stream: &'chars mut ByteStream, start_location: Location) -> Self { + | ---------- required by a bound in this associated function +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +253 | let parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0283]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser/quirks.rs:327:13 + | +327 | let parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^ ---------------------------------------------------- type must be known at this point + | + = note: cannot satisfy `_: gosub_shared::traits::document::Document<_>` + = help: the following types implement trait `gosub_shared::traits::document::Document`: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl +note: required by a bound in `parser::Html5Parser::<'chars, D, C>::new_parser` + --> crates/gosub_html5/src/parser.rs:270:8 + | +270 | D: Document, + | ^^^^^^^^^^^ required by this bound in `Html5Parser::<'chars, D, C>::new_parser` +... +318 | pub fn new_parser(stream: &'chars mut ByteStream, start_location: Location) -> Self { + | ---------- required by a bound in this associated function +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +327 | let parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0283]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser/quirks.rs:352:13 + | +352 | let parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^ ---------------------------------------------------- type must be known at this point + | + = note: cannot satisfy `_: gosub_shared::traits::document::Document<_>` + = help: the following types implement trait `gosub_shared::traits::document::Document`: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl +note: required by a bound in `parser::Html5Parser::<'chars, D, C>::new_parser` + --> crates/gosub_html5/src/parser.rs:270:8 + | +270 | D: Document, + | ^^^^^^^^^^^ required by this bound in `Html5Parser::<'chars, D, C>::new_parser` +... +318 | pub fn new_parser(stream: &'chars mut ByteStream, start_location: Location) -> Self { + | ---------- required by a bound in this associated function +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +352 | let parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0283]: type annotations needed + --> crates/gosub_html5/src/parser/tree_builder.rs:112:22 + | +112 | .run_test(test.clone(), scripting_enabled) + | ^^^^^^^^ cannot infer type of the type parameter `P` declared on the method `run_test` + | + = note: cannot satisfy `_: gosub_shared::traits::html5::Html5Parser<_>` + = help: the following types implement trait `gosub_shared::traits::html5::Html5Parser`: + gosub_html5::parser::Html5Parser<'_, D, C> + parser::Html5Parser<'_, D, C> +note: required by a bound in `Harness::run_test` + --> /home/jthijssen/code/gosub/gosub-engine/crates/gosub_testing/src/testing/tree_construction.rs:80:24 + | +80 | pub fn run_test, C: CssSystem>( + | ^^^^^^^^^^^^^^ required by this bound in `Harness::run_test` +help: consider specifying the generic arguments + | +112 | .run_test::(test.clone(), scripting_enabled) + | ++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4297 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4295:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4295 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4295 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4298 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4299 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4300 | node_create!(parser, "button"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0283]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4310:13 + | +4310 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ ---------------------------------------------------- type must be known at this point + | + = note: cannot satisfy `_: gosub_shared::traits::document::Document<_>` + = help: the following types implement trait `gosub_shared::traits::document::Document`: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl +note: required by a bound in `parser::Html5Parser::<'chars, D, C>::new_parser` + --> crates/gosub_html5/src/parser.rs:270:8 + | +270 | D: Document, + | ^^^^^^^^^^^ required by this bound in `Html5Parser::<'chars, D, C>::new_parser` +... +318 | pub fn new_parser(stream: &'chars mut ByteStream, start_location: Location) -> Self { + | ---------- required by a bound in this associated function +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4310 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4324 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4322:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4322 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4322 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4325 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4326 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4327 | node_create!(parser, "button"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4340 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4338:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4338 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4338 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4341 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4342 | node_create!(parser, "table"); + | ----------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4343 | node_create!(parser, "tr"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4344 | node_create!(parser, "td"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4345 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4346 | node_create!(parser, "span"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4378 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4376:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4376 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4376 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4379 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4380 | node_create!(parser, "ul"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4381 | node_create!(parser, "li"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4382 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4383 | node_create!(parser, "button"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4397 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4395:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4395 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4395 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4398 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4399 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4400 | node_create!(parser, "ul"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4401 | node_create!(parser, "li"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4402 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4416 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4414:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4414 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4414 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4417 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4418 | node_create!(parser, "table"); + | ----------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4419 | node_create!(parser, "tbody"); + | ----------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4420 | node_create!(parser, "tr"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4421 | node_create!(parser, "td"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4422 | node_create!(parser, "button"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4423 | node_create!(parser, "span"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4437 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4435:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4435 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4435 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4438 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4439 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4440 | node_create!(parser, "object"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4441 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4442 | node_create!(parser, "a"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4443 | node_create!(parser, "span"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4457 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4455:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4455 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4455 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4458 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4459 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4460 | node_create!(parser, "ul"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4461 | node_create!(parser, "li"); + | -------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4462 | node_create!(parser, "marquee"); + | ------------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4463 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4477 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4475:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4475 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4475 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4478 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4479 | node_create!(parser, "div"); + | --------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4480 | node_create!(parser, "table"); + | ----------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4481 | node_create!(parser, "caption"); + | ------------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4482 | node_create!(parser, "p"); + | ------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4496 | node_create!(parser, "html"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0282]: type annotations needed for `parser::Html5Parser<'_, _, _>` + --> crates/gosub_html5/src/parser.rs:4494:13 + | +4287 | let node_id = $self.document.get_mut().add_node(node, NodeId::root(), None); + | -------- type must be known at this point +... +4494 | let mut parser = Html5Parser::new_parser(stream, Location::default()); + | ^^^^^^^^^^ + | +help: consider giving `parser` an explicit type, where the type for type parameter `D` is specified + | +4494 | let mut parser: parser::Html5Parser<'_, D, C> = Html5Parser::new_parser(stream, Location::default()); + | +++++++++++++++++++++++++++++++ + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4497 | node_create!(parser, "body"); + | ---------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4498 | node_create!(parser, "select"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4499 | node_create!(parser, "optgroup"); + | -------------------------------- in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: no function or associated item named `new_element` found for struct `nodeimpl::NodeImpl` in the current scope + --> crates/gosub_html5/src/parser.rs:4280:34 + | +4280 | let node = NodeImpl::new_element( + | ^^^^^^^^^^^ function or associated item not found in `NodeImpl<_>` +... +4500 | node_create!(parser, "option"); + | ------------------------------ in this macro invocation + | + ::: crates/gosub_html5/src/node/nodeimpl.rs:30:1 + | +30 | pub struct NodeImpl { + | --------------------------------- function or associated item `new_element` not found for this struct + | +note: if you're trying to build a new `nodeimpl::NodeImpl<_>`, consider using `nodeimpl::NodeImpl::::new` which returns `nodeimpl::NodeImpl<_>` + --> crates/gosub_html5/src/node/nodeimpl.rs:204:5 + | +204 | / pub fn new( +205 | | document: DocumentHandle, C>, +206 | | location: Location, +207 | | data: &NodeDataTypeInternal, +208 | | ) -> Self { + | |_____________^ + = note: this error originates in the macro `node_create` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/parser.rs:4516:58 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +4516 | let _ = Html5Parser::parse_document(&mut stream, ::clone(&document), None); + | ++++ + + +error[E0277]: the trait bound `dyn gosub_shared::traits::document::Document<_>: Clone` is not satisfied + --> crates/gosub_html5/src/parser.rs:4516:58 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ the trait `Clone` is not implemented for `dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4516:58 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4516:74 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4516:74 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + = note: required for the cast from `&gosub_shared::document::DocumentHandle<_, _>` to `&dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4516:58 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4516:58 + | +4516 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | --------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `DocumentHandle<_, _>`, found `dyn Document` + | | + | arguments to this function are incorrect + | + = note: expected struct `gosub_shared::document::DocumentHandle<_, _>` + found trait object `dyn gosub_shared::traits::document::Document<_>` +note: associated function defined here + --> crates/gosub_html5/src/parser.rs:432:12 + | +432 | pub fn parse_document( + | ^^^^^^^^^^^^^^ +433 | stream: &mut ByteStream, +434 | document: DocumentHandle, + | ------------------------------ + +error[E0277]: `gosub_shared::document::DocumentHandle<_, _>` doesn't implement `std::fmt::Display` + --> crates/gosub_html5/src/parser.rs:4518:24 + | +4518 | println!("{}", document); + | ^^^^^^^^ `gosub_shared::document::DocumentHandle<_, _>` cannot be formatted with the default formatter + | + = help: the trait `std::fmt::Display` is not implemented for `gosub_shared::document::DocumentHandle<_, _>` + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead + = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/parser.rs:4528:58 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +4528 | let _ = Html5Parser::parse_document(&mut stream, ::clone(&document), None); + | ++++ + + +error[E0277]: the trait bound `dyn gosub_shared::traits::document::Document<_>: Clone` is not satisfied + --> crates/gosub_html5/src/parser.rs:4528:58 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ the trait `Clone` is not implemented for `dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4528:58 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4528:74 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4528:74 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + = note: required for the cast from `&gosub_shared::document::DocumentHandle<_, _>` to `&dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4528:58 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4528:58 + | +4528 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | --------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `DocumentHandle<_, _>`, found `dyn Document` + | | + | arguments to this function are incorrect + | + = note: expected struct `gosub_shared::document::DocumentHandle<_, _>` + found trait object `dyn gosub_shared::traits::document::Document<_>` +note: associated function defined here + --> crates/gosub_html5/src/parser.rs:432:12 + | +432 | pub fn parse_document( + | ^^^^^^^^^^^^^^ +433 | stream: &mut ByteStream, +434 | document: DocumentHandle, + | ------------------------------ + +error[E0282]: type annotations needed for `gosub_shared::document::DocumentHandle<_, _>` + --> crates/gosub_html5/src/parser.rs:4527:13 + | +4527 | let document = DocumentBuilder::new_document(None); + | ^^^^^^^^ +... +4533 | let div = binding.get_node_by_id(4usize.into()).unwrap(); + | -------------- type must be known at this point + | +help: consider giving `document` an explicit type, where the placeholders `_` are specified + | +4527 | let document: gosub_shared::document::DocumentHandle<_, C> = DocumentBuilder::new_document(None); + | ++++++++++++++++++++++++++++++++++++++++++++++ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4541:44 + | +4541 | assert!(element.classes().contains("one")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4542:44 + | +4542 | assert!(element.classes().contains("two")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4543:44 + | +4543 | assert!(element.classes().contains("three")); + | -------- ^^^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0599]: no method named `is_active` found for struct `Vec` in the current scope + --> crates/gosub_html5/src/parser.rs:4545:35 + | +4545 | assert!(element.classes().is_active("one")); + | ^^^^^^^^^ method not found in `Vec` + +error[E0599]: no method named `is_active` found for struct `Vec` in the current scope + --> crates/gosub_html5/src/parser.rs:4546:35 + | +4546 | assert!(element.classes().is_active("two")); + | ^^^^^^^^^ method not found in `Vec` + +error[E0599]: no method named `is_active` found for struct `Vec` in the current scope + --> crates/gosub_html5/src/parser.rs:4547:35 + | +4547 | assert!(element.classes().is_active("three")); + | ^^^^^^^^^ method not found in `Vec` + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/parser.rs:4557:58 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +4557 | let _ = Html5Parser::parse_document(&mut stream, ::clone(&document), None); + | ++++ + + +error[E0277]: the trait bound `dyn gosub_shared::traits::document::Document<_>: Clone` is not satisfied + --> crates/gosub_html5/src/parser.rs:4557:58 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ the trait `Clone` is not implemented for `dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4557:58 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4557:74 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4557:74 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + = note: required for the cast from `&gosub_shared::document::DocumentHandle<_, _>` to `&dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4557:58 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4557:58 + | +4557 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | --------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `DocumentHandle<_, _>`, found `dyn Document` + | | + | arguments to this function are incorrect + | + = note: expected struct `gosub_shared::document::DocumentHandle<_, _>` + found trait object `dyn gosub_shared::traits::document::Document<_>` +note: associated function defined here + --> crates/gosub_html5/src/parser.rs:432:12 + | +432 | pub fn parse_document( + | ^^^^^^^^^^^^^^ +433 | stream: &mut ByteStream, +434 | document: DocumentHandle, + | ------------------------------ + +error[E0282]: type annotations needed for `gosub_shared::document::DocumentHandle<_, _>` + --> crates/gosub_html5/src/parser.rs:4556:13 + | +4556 | let document = DocumentBuilder::new_document(None); + | ^^^^^^^^ +... +4562 | let div = binding.get_node_by_id(4usize.into()).unwrap(); + | -------------- type must be known at this point + | +help: consider giving `document` an explicit type, where the placeholders `_` are specified + | +4556 | let document: gosub_shared::document::DocumentHandle<_, C> = DocumentBuilder::new_document(None); + | ++++++++++++++++++++++++++++++++++++++++++++++ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4570:44 + | +4570 | assert!(element.classes().contains("one")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4571:44 + | +4571 | assert!(element.classes().contains("two")); + | -------- ^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4572:44 + | +4572 | assert!(element.classes().contains("three")); + | -------- ^^^^^^^ expected `&String`, found `&str` + | | + | arguments to this method are incorrect + | + = note: expected reference `&std::string::String` + found reference `&'static str` +note: method defined here + --> /home/jthijssen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2525:12 + | +2525 | pub fn contains(&self, x: &T) -> bool + | ^^^^^^^^ + +error[E0599]: no method named `is_active` found for struct `Vec` in the current scope + --> crates/gosub_html5/src/parser.rs:4574:35 + | +4574 | assert!(element.classes().is_active("one")); + | ^^^^^^^^^ method not found in `Vec` + +error[E0599]: no method named `is_active` found for struct `Vec` in the current scope + --> crates/gosub_html5/src/parser.rs:4575:35 + | +4575 | assert!(element.classes().is_active("two")); + | ^^^^^^^^^ method not found in `Vec` + +error[E0599]: no method named `is_active` found for struct `Vec` in the current scope + --> crates/gosub_html5/src/parser.rs:4576:35 + | +4576 | assert!(element.classes().is_active("three")); + | ^^^^^^^^^ method not found in `Vec` + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/parser.rs:4590:58 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +4590 | let _ = Html5Parser::parse_document(&mut stream, ::clone(&document), None); + | ++++ + + +error[E0277]: the trait bound `dyn gosub_shared::traits::document::Document<_>: Clone` is not satisfied + --> crates/gosub_html5/src/parser.rs:4590:58 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ the trait `Clone` is not implemented for `dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4590:58 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4590:74 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4590:74 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + = note: required for the cast from `&gosub_shared::document::DocumentHandle<_, _>` to `&dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4590:58 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4590:58 + | +4590 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | --------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `DocumentHandle<_, _>`, found `dyn Document` + | | + | arguments to this function are incorrect + | + = note: expected struct `gosub_shared::document::DocumentHandle<_, _>` + found trait object `dyn gosub_shared::traits::document::Document<_>` +note: associated function defined here + --> crates/gosub_html5/src/parser.rs:432:12 + | +432 | pub fn parse_document( + | ^^^^^^^^^^^^^^ +433 | stream: &mut ByteStream, +434 | document: DocumentHandle, + | ------------------------------ + +error[E0282]: type annotations needed for `gosub_shared::document::DocumentHandle<_, _>` + --> crates/gosub_html5/src/parser.rs:4589:13 + | +4589 | let document = DocumentBuilder::new_document(None); + | ^^^^^^^^ +... +4592 | assert!(document.get().get_node_by_named_id("my id").is_none()); + | -------------------- type must be known at this point + | +help: consider giving `document` an explicit type, where the placeholders `_` are specified + | +4589 | let document: gosub_shared::document::DocumentHandle<_, C> = DocumentBuilder::new_document(None); + | ++++++++++++++++++++++++++++++++++++++++++++++ + +error[E0782]: trait objects must include the `dyn` keyword + --> crates/gosub_html5/src/parser.rs:4607:58 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ + | +help: add `dyn` keyword before this trait + | +4607 | let _ = Html5Parser::parse_document(&mut stream, ::clone(&document), None); + | ++++ + + +error[E0277]: the trait bound `dyn gosub_shared::traits::document::Document<_>: Clone` is not satisfied + --> crates/gosub_html5/src/parser.rs:4607:58 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ the trait `Clone` is not implemented for `dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4607:58 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4607:74 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4607:74 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + = note: required for the cast from `&gosub_shared::document::DocumentHandle<_, _>` to `&dyn gosub_shared::traits::document::Document<_>` + +error[E0038]: the trait `gosub_shared::traits::document::Document` cannot be made into an object + --> crates/gosub_html5/src/parser.rs:4607:58 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `gosub_shared::traits::document::Document` cannot be made into an object + | + = note: the trait cannot be made into an object because it requires `Self: Sized` + = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `gosub_shared::traits::document::Document` for this new enum and using it instead: + doc::document::DocumentImpl + gosub_html5::doc::document::DocumentImpl + +error[E0308]: mismatched types + --> crates/gosub_html5/src/parser.rs:4607:58 + | +4607 | let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + | --------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `DocumentHandle<_, _>`, found `dyn Document` + | | + | arguments to this function are incorrect + | + = note: expected struct `gosub_shared::document::DocumentHandle<_, _>` + found trait object `dyn gosub_shared::traits::document::Document<_>` +note: associated function defined here + --> crates/gosub_html5/src/parser.rs:432:12 + | +432 | pub fn parse_document( + | ^^^^^^^^^^^^^^ +433 | stream: &mut ByteStream, +434 | document: DocumentHandle, + | ------------------------------ + +error[E0282]: type annotations needed for `gosub_shared::document::DocumentHandle<_, _>` + --> crates/gosub_html5/src/parser.rs:4606:13 + | +4606 | let document = DocumentBuilder::new_document(None); + | ^^^^^^^^ +... +4611 | let div = doc_read.get_node_by_named_id("myid").unwrap(); + | -------------------- type must be known at this point + | +help: consider giving `document` an explicit type, where the placeholders `_` are specified + | +4606 | let document: gosub_shared::document::DocumentHandle<_, C> = DocumentBuilder::new_document(None); + | ++++++++++++++++++++++++++++++++++++++++++++++ + +warning: variable does not need to be mutable + --> crates/gosub_html5/src/doc/document.rs:671:17 + | +671 | let mut div_1 = binding.node_by_id_mut(div1_id).unwrap(); + | ----^^^^^ + | | + | help: remove this `mut` + | + = note: `#[warn(unused_mut)]` on by default + +warning: variable does not need to be mutable + --> crates/gosub_html5/src/doc/document.rs:672:25 + | +672 | if let Some(mut data) = div_1.get_element_data_mut() { + | ----^^^^ + | | + | help: remove this `mut` + +error[E0382]: borrow of moved value: `div_1` + --> crates/gosub_html5/src/doc/document.rs:678:80 + | +636 | let div_1: NodeImpl = DocumentImpl::new_element_node( + | ----- move occurs because `div_1` has type `nodeimpl::NodeImpl`, which does not implement the `Copy` trait +... +651 | let div1_id = doc_handle.get_mut().register_node_at(div_1, NodeId::root(), None); + | ----- value moved here +... +678 | assert_eq!(doc_handle.get().get_node_by_named_id("newid").unwrap().id, div_1.id()); + | ^^^^^ value borrowed here after move + | +help: consider cloning the value if the performance cost is acceptable + | +651 | let div1_id = doc_handle.get_mut().register_node_at(div_1.clone(), NodeId::root(), None); + | ++++++++ + +warning: unused variable: `element1` + --> crates/gosub_html5/src/doc/document.rs:707:43 + | +707 | let NodeDataTypeInternal::Element(element1) = &get_node1.data else { + | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_element1` + | + = note: `#[warn(unused_variables)]` on by default + +warning: unused variable: `element2` + --> crates/gosub_html5/src/doc/document.rs:712:43 + | +712 | let NodeDataTypeInternal::Element(element2) = &get_node2.data else { + | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_element2` + +Some errors have detailed explanations: E0038, E0277, E0282, E0283, E0308, E0382, E0423, E0425, E0599... +For more information about an error, try `rustc --explain E0038`. +error: could not compile `gosub_html5` (lib test) due to 344 previous errors; 4 warnings emitted + +running 4 tests +.... +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +....... +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + +error: package ID specification `gosub_render_utils` did not match any packages + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 11 tests +........... +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.35s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + +error[E0432]: unresolved import `resvg` + --> crates/gosub_svg/src/lib.rs:1:7 + | +1 | use ::resvg::usvg; + | ^^^^^ could not find `resvg` in the list of imported crates + +For more information about this error, try `rustc --explain E0432`. +error: could not compile `gosub_svg` (lib) due to 1 previous error +error: could not compile `gosub_svg` (lib test) due to 1 previous error + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 26 tests +.......................... +test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 37 tests +..................................... +test result: ok. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 2 tests +.. +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + diff --git a/crates/gosub_html5/src/doc/document.rs b/crates/gosub_html5/src/doc/document.rs index 999931e13..f89de3557 100755 --- a/crates/gosub_html5/src/doc/document.rs +++ b/crates/gosub_html5/src/doc/document.rs @@ -319,7 +319,13 @@ impl Document for DocumentImpl { impl DocumentImpl { /// Print a node and all its children in a tree-like structure - pub fn print_tree(&self, node: & as Document>::Node, prefix: String, last: bool, f: &mut Formatter) { + pub fn print_tree( + &self, + node: & as Document>::Node, + prefix: String, + last: bool, + f: &mut Formatter, + ) { let mut buffer = prefix.clone(); if last { buffer.push_str("└─ "); @@ -333,14 +339,11 @@ impl DocumentImpl { _ = writeln!(f, "{buffer}Document"); } NodeDataTypeInternal::DocType(DocTypeData { - name, - pub_identifier, - sys_identifier, - }) => { - _ = writeln!( - f, - r#"{buffer}"#, - ); + name, + pub_identifier, + sys_identifier, + }) => { + _ = writeln!(f, r#"{buffer}"#,); } NodeDataTypeInternal::Text(TextData { value, .. }) => { _ = writeln!(f, r#"{buffer}"{value}""#); @@ -390,7 +393,6 @@ impl Display for DocumentImpl { } } - impl DocumentImpl { /// Fetches a node by named id (string) or returns None when no node with this ID is found pub fn get_node_by_named_id(&self, named_id: &str) -> Option<& as Document>::Node> { @@ -528,21 +530,19 @@ impl, C: CssSystem> Iterator for TreeIterator { } } - - #[cfg(test)] mod tests { use super::*; + use crate::doc::builder::DocumentBuilder as DocumentBuilderImpl; use crate::doc::task_queue::DocumentTaskQueue; use crate::node::HTML_NAMESPACE; use crate::parser::query::Query; + use gosub_css3::system::Css3System; use gosub_shared::byte_stream::Location; - use gosub_shared::traits::node::NodeType; - use std::collections::HashMap; - use crate::doc::builder::DocumentBuilder as DocumentBuilderImpl; use gosub_shared::traits::document::DocumentBuilder; - use gosub_css3::system::Css3System; use gosub_shared::traits::node::ElementDataType; + use gosub_shared::traits::node::NodeType; + use std::collections::HashMap; type Document = DocumentImpl; @@ -700,8 +700,9 @@ mod tests { doc_handle.get_mut().register_node_at(node_1, NodeId::root(), None); doc_handle.get_mut().register_node_at(node_2, NodeId::root(), None); - let get_node1 = doc_handle.get().node_by_id(NodeId::from(1usize)).unwrap(); - let get_node2 = doc_handle.get().node_by_id(NodeId::from(2usize)).unwrap(); + let binding = doc_handle.get(); + let get_node1 = binding.node_by_id(NodeId::from(1usize)).unwrap(); + let get_node2 = binding.node_by_id(NodeId::from(2usize)).unwrap(); let NodeDataTypeInternal::Element(element1) = &get_node1.data else { panic!() @@ -716,7 +717,8 @@ mod tests { #[test] fn document_task_queue() { - let document = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); // Using task queue to create the following structure initially: //
@@ -729,7 +731,7 @@ mod tests { // then flush the queue and use it again to add an attribute to

: //

hey

- let mut task_queue = DocumentTaskQueue::new(&document); + let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); // NOTE: only elements return the ID let div_id = task_queue.create_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); @@ -743,7 +745,7 @@ mod tests { task_queue.create_comment("comment inside div", div_id, Location::default()); // at this point, the DOM should have NO nodes (besides root) - assert_eq!(document.get().arena.count_nodes(), 1); + assert_eq!(doc_handle.get().node_count(), 1); // validate our queue is loaded assert!(!task_queue.is_empty()); @@ -754,7 +756,7 @@ mod tests { assert!(task_queue.is_empty()); // DOM should now have all our nodes - assert_eq!(document.get().arena.count_nodes(), 6); + assert_eq!(doc_handle.get().arena.node_count(), 6); // NOTE: these checks are scoped separately since this is using an // immutable borrow, and we make a mutable borrow after (to insert the attribute). @@ -762,24 +764,24 @@ mod tests { // (and again an immutable borrow for validation afterward) { // validate DOM is correctly laid out - let doc_read = document.get(); + let doc_read = doc_handle.get(); let root = doc_read.get_root(); // let root_children = &root.children; // div child - let div_child = doc_read.get_node_by_id(root_children[0]).unwrap(); + let div_child = doc_read.node_by_id(root_children[0]).unwrap(); assert_eq!(div_child.type_of(), NodeType::ElementNode); - assert_eq!(div_child.name, "div"); + assert_eq!(div_child.get_element_data().unwrap().name, "div"); let div_children = &div_child.children; // p child - let p_child = doc_read.get_node_by_id(div_children[0]).unwrap(); + let p_child = doc_read.node_by_id(div_children[0]).unwrap(); assert_eq!(p_child.type_of(), NodeType::ElementNode); - assert_eq!(p_child.name, "p"); + assert_eq!(p_child.get_element_data().unwrap().name, "p"); let p_children = &p_child.children; // comment inside p - let p_comment = doc_read.get_node_by_id(p_children[0]).unwrap(); + let p_comment = doc_read.node_by_id(p_children[0]).unwrap(); assert_eq!(p_comment.type_of(), NodeType::CommentNode); let NodeDataTypeInternal::Comment(p_comment_data) = &p_comment.data else { panic!() @@ -787,7 +789,7 @@ mod tests { assert_eq!(p_comment_data.value, "comment inside p"); // body inside p - let p_body = doc_read.get_node_by_id(p_children[1]).unwrap(); + let p_body = doc_read.node_by_id(p_children[1]).unwrap(); assert_eq!(p_body.type_of(), NodeType::TextNode); let NodeDataTypeInternal::Text(p_body_data) = &p_body.data else { panic!() @@ -795,7 +797,7 @@ mod tests { assert_eq!(p_body_data.value, "hey"); // comment inside div - let div_comment = doc_read.get_node_by_id(div_children[1]).unwrap(); + let div_comment = doc_read.node_by_id(div_children[1]).unwrap(); assert_eq!(div_comment.type_of(), NodeType::CommentNode); let NodeDataTypeInternal::Comment(div_comment_data) = &div_comment.data else { panic!() @@ -810,12 +812,12 @@ mod tests { let errors = task_queue.flush(); assert!(errors.is_empty()); - let doc_read = document.get(); + let doc_read = doc_handle.get(); // validate ID is searchable in dom assert_eq!(*doc_read.named_id_elements.get("myid").unwrap(), p_id); // validate attribute is applied to underlying element - let p_node = doc_read.get_node_by_id(p_id).unwrap(); + let p_node = doc_read.node_by_id(p_id).unwrap(); let NodeDataTypeInternal::Element(p_element) = &p_node.data else { panic!() }; @@ -824,9 +826,10 @@ mod tests { #[test] fn task_queue_insert_attribute_failues() { - let document = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); - let mut task_queue = DocumentTaskQueue::new(&document); + let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); let div_id = task_queue.create_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); task_queue.create_comment("content", div_id, Location::default()); // this is NodeId::from(2) task_queue.flush(); @@ -858,7 +861,7 @@ mod tests { ); // validate that invalid changes did not apply to DOM - let doc_read = document.get(); + let doc_read = doc_handle.get(); assert!(!doc_read.named_id_elements.contains_key("my id")); assert!(!doc_read.named_id_elements.contains_key("")); } @@ -867,7 +870,8 @@ mod tests { // but using tree builder directly instead of the task queue #[test] fn document_tree_builder() { - let mut document = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); // Using tree builder to create the following structure: //
@@ -879,41 +883,67 @@ mod tests { //
// NOTE: only elements return the ID - let div_id = document.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let div_node = Document::new_element_node( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + let div_id = doc_handle.get_mut().register_node_at(div_node, NodeId::root(), None); assert_eq!(div_id, NodeId::from(1usize)); - let p_id = document.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let p_node = Document::new_element_node( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + let p_id = doc_handle.get_mut().register_node_at(p_node, div_id, None); assert_eq!(p_id, NodeId::from(2usize)); - document.create_comment("comment inside p", p_id, Location::default()); - document.create_text("hey", p_id, Location::default()); - document.create_comment("comment inside div", div_id, Location::default()); + doc_handle.get_mut().register_node_at( + Document::new_comment_node(doc_handle.clone(), "comment inside p", Location::default()), + p_id, + None, + ); + doc_handle.get_mut().register_node_at( + Document::new_text_node(doc_handle.clone(), "hey", Location::default()), + p_id, + None, + ); + doc_handle.get_mut().register_node_at( + Document::new_comment_node(doc_handle.clone(), "comment inside div", Location::default()), + div_id, + None, + ); let res = document.insert_attribute("id", "myid", p_id, Location::default()); assert!(res.is_ok()); // DOM should now have all our nodes - assert_eq!(document.get().arena.count_nodes(), 6); + assert_eq!(doc_handle.get().node_count(), 6); // validate DOM is correctly laid out - let doc_read = document.get(); + let doc_read = doc_handle.get(); let root = doc_read.get_root(); // let root_children = &root.children; // div child - let div_child = doc_read.get_node_by_id(root_children[0]).unwrap(); + let div_child = doc_read.node_by_id(root_children[0]).unwrap(); assert_eq!(div_child.type_of(), NodeType::ElementNode); - assert_eq!(div_child.name, "div"); + assert_eq!(div_child.get_element_data().unwrap().name, "div"); let div_children = &div_child.children; // p child - let p_child = doc_read.get_node_by_id(div_children[0]).unwrap(); + let p_child = doc_read.node_by_id(div_children[0]).unwrap(); assert_eq!(p_child.type_of(), NodeType::ElementNode); - assert_eq!(p_child.name, "p"); + assert_eq!(p_child.get_element_data().unwrap().name, "p"); let p_children = &p_child.children; // comment inside p - let p_comment = doc_read.get_node_by_id(p_children[0]).unwrap(); + let p_comment = doc_read.node_by_id(p_children[0]).unwrap(); assert_eq!(p_comment.type_of(), NodeType::CommentNode); let NodeDataTypeInternal::Comment(p_comment_data) = &p_comment.data else { panic!() @@ -921,7 +951,7 @@ mod tests { assert_eq!(p_comment_data.value, "comment inside p"); // body inside p - let p_body = doc_read.get_node_by_id(p_children[1]).unwrap(); + let p_body = doc_read.node_by_id(p_children[1]).unwrap(); assert_eq!(p_body.type_of(), NodeType::TextNode); let NodeDataTypeInternal::Text(p_body_data) = &p_body.data else { panic!() @@ -929,7 +959,7 @@ mod tests { assert_eq!(p_body_data.value, "hey"); // comment inside div - let div_comment = doc_read.get_node_by_id(div_children[1]).unwrap(); + let div_comment = doc_read.node_by_id(div_children[1]).unwrap(); assert_eq!(div_comment.type_of(), NodeType::CommentNode); let NodeDataTypeInternal::Comment(div_comment_data) = &div_comment.data else { panic!() @@ -940,7 +970,7 @@ mod tests { assert_eq!(*doc_read.named_id_elements.get("myid").unwrap(), p_id); // validate attribute is applied to underlying element - let p_node = doc_read.get_node_by_id(p_id).unwrap(); + let p_node = doc_read.node_by_id(p_id).unwrap(); let NodeDataTypeInternal::Element(p_element) = &p_node.data else { panic!() }; @@ -949,12 +979,25 @@ mod tests { #[test] fn insert_generic_attribute() { - let mut doc = DocumentBuilder::new_document(None); - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let res = doc.insert_attribute("key", "value", div_id, Location::default()); - assert!(res.is_ok()); - let doc_read = doc.get(); - let NodeDataTypeInternal::Element(element) = &doc_read.get_node_by_id(div_id).unwrap().data else { + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let node = Document::new_element_node( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + let node_id = doc_handle.get_mut().register_node_at(node, NodeId::root(), None); + + let node = doc_handle.get().node_by_id_mut(node_id).unwrap(); + if let Some(data) = node.get_element_data_mut() { + data.add_attribute("key", "value"); + } + + let doc_read = doc_handle.get(); + let NodeDataTypeInternal::Element(element) = doc_read.node_by_id(node_id).unwrap().get_element_data() else { panic!() }; assert_eq!(element.attributes().get("key").unwrap(), "value"); @@ -962,14 +1005,16 @@ mod tests { #[test] fn task_queue_insert_generic_attribute() { - let doc = DocumentBuilder::new_document(None); - let mut task_queue = DocumentTaskQueue::new(&doc); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); let div_id = task_queue.create_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); let _ = task_queue.insert_attribute("key", "value", div_id, Location::default()); let errors = task_queue.flush(); assert!(errors.is_empty()); - let doc_read = doc.get(); - let NodeDataTypeInternal::Element(element) = &doc_read.get_node_by_id(div_id).unwrap().data else { + let doc_read = doc_handle.get(); + let NodeDataTypeInternal::Element(element) = &doc_read.node_by_id(div_id).unwrap().data else { panic!() }; assert_eq!(element.attributes().get("key").unwrap(), "value"); @@ -977,12 +1022,22 @@ mod tests { #[test] fn insert_class_attribute() { - let mut doc = DocumentBuilder::new_document(None); - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let res = doc.insert_attribute("class", "one two three", div_id, Location::default()); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let res = doc_handle.insert_attribute("class", "one two three", div_id, Location::default()); assert!(res.is_ok()); - let doc_read = doc.get(); - let NodeDataTypeInternal::Element(element) = &doc_read.get_node_by_id(div_id).unwrap().data else { + let doc_read = doc_handle.get(); + let NodeDataTypeInternal::Element(element) = &doc_read.node_by_id(div_id).unwrap().data else { panic!() }; assert!(element.classes().contains("one")); @@ -992,14 +1047,16 @@ mod tests { #[test] fn task_queue_insert_class_attribute() { - let doc = DocumentBuilder::new_document(None); - let mut task_queue = DocumentTaskQueue::new(&doc); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let mut task_queue = DocumentTaskQueue::new(doc_handle.clone()); let div_id = task_queue.create_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); let _ = task_queue.insert_attribute("class", "one two three", div_id, Location::default()); let errors = task_queue.flush(); assert!(errors.is_empty()); - let doc_read = doc.get(); - let NodeDataTypeInternal::Element(element) = &doc_read.get_node_by_id(div_id).unwrap().data else { + let doc_read = doc_handle.get(); + let NodeDataTypeInternal::Element(element) = &doc_handle.get().node_by_id(div_id).unwrap().data else { panic!() }; assert!(element.classes().contains("one")); @@ -1009,10 +1066,11 @@ mod tests { #[test] fn uninitialized_query() { - let doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); let query = Query::new(); - let found_ids = doc.query(&query); + let found_ids = doc_handle.query(&query); if let Err(err) = found_ids { assert_eq!( err.to_string(), @@ -1032,20 +1090,74 @@ mod tests { //
//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 - let _ = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().equals_tag("p").find_first(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 1); assert_eq!(found_ids, [p_id]); } @@ -1059,20 +1171,74 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let p_id_2 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let p_id_2 = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let p_id_3 = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let p_id_3 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 - let p_id_4 = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let p_id_4 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().equals_tag("p").find_all(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 4); assert_eq!(found_ids, [p_id, p_id_2, p_id_3, p_id_4]); } @@ -1086,22 +1252,77 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let p_id_2 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let p_id_2 = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); - let res = doc.insert_attribute("id", "myid", p_id_2, Location::default()); + let res = doc_handle.insert_attribute("id", "myid", p_id_2, Location::default()); assert!(res.is_ok()); - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 - let _ = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().equals_id("myid").find_first(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 1); assert_eq!(found_ids, [p_id_2]); } @@ -1115,30 +1336,87 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let mut res = doc.insert_attribute("class", "one two", p_id, Location::default()); + let mut res = doc_handle.insert_attribute("class", "one two", p_id, Location::default()); assert!(res.is_ok()); - let p_id_2 = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("class", "one", p_id_2, Location::default()); + let p_id_2 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + res = doc_handle.insert_attribute("class", "one", p_id_2, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("id", "myid", p_id_2, Location::default()); + res = doc_handle.insert_attribute("id", "myid", p_id_2, Location::default()); assert!(res.is_ok()); - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let p_id_3 = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("class", "two three", p_id_3, Location::default()); + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let p_id_3 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 + + res = doc_handle.insert_attribute("class", "two three", p_id_3, Location::default()); assert!(res.is_ok()); - let p_id_4 = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("class", "three", p_id_4, Location::default()); + let p_id_4 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + res = doc_handle.insert_attribute("class", "three", p_id_4, Location::default()); assert!(res.is_ok()); let query = Query::new().contains_class("two").find_first(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 1); assert_eq!(found_ids, [p_id]); } @@ -1152,33 +1430,90 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let mut res = doc.insert_attribute("class", "one two", p_id, Location::default()); - assert!(res.is_ok()); - let p_id_2 = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("class", "one", p_id_2, Location::default()); - assert!(res.is_ok()); - res = doc.insert_attribute("id", "myid", p_id_2, Location::default()); - assert!(res.is_ok()); + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let p_id_3 = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("class", "two three", p_id_3, Location::default()); + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let mut res = doc_handle.insert_attribute("class", "one two", p_id, Location::default()); assert!(res.is_ok()); + let p_id_2 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let p_id_4 = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("class", "three", p_id_4, Location::default()); + res = doc_handle.insert_attribute("class", "one", p_id_2, Location::default()); + assert!(res.is_ok()); + res = doc_handle.insert_attribute("id", "myid", p_id_2, Location::default()); assert!(res.is_ok()); - let query = Query::new().contains_class("two").find_all(); - let found_ids = doc.query(&query).unwrap(); - assert_eq!(found_ids.len(), 2); - assert_eq!(found_ids, [p_id, p_id_3]); - } + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let p_id_3 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 + + res = doc_handle.insert_attribute("class", "two three", p_id_3, Location::default()); + assert!(res.is_ok()); + + let p_id_4 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + res = doc_handle.insert_attribute("class", "three", p_id_4, Location::default()); + assert!(res.is_ok()); + + let query = Query::new().contains_class("two").find_all(); + let found_ids = doc_handle.query(&query).unwrap(); + assert_eq!(found_ids.len(), 2); + assert_eq!(found_ids, [p_id, p_id_3]); + } #[test] fn single_query_contains_attribute_find_first() { @@ -1189,34 +1524,89 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let mut res = doc.insert_attribute("id", "myid", div_id_2, Location::default()); + let mut res = doc_handle.insert_attribute("id", "myid", div_id_2, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("style", "somestyle", div_id_2, Location::default()); + res = doc_handle.insert_attribute("style", "somestyle", div_id_2, Location::default()); assert!(res.is_ok()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("title", "key", p_id, Location::default()); + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + res = doc_handle.insert_attribute("title", "key", p_id, Location::default()); assert!(res.is_ok()); - let _ = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("style", "otherstyle", div_id_3, Location::default()); + res = doc_handle.insert_attribute("style", "otherstyle", div_id_3, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("id", "otherid", div_id_3, Location::default()); + res = doc_handle.insert_attribute("id", "otherid", div_id_3, Location::default()); assert!(res.is_ok()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 + + let p_id_4 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let p_id_4 = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("title", "yo", p_id_4, Location::default()); + res = doc_handle.insert_attribute("title", "yo", p_id_4, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("style", "cat", p_id_4, Location::default()); + res = doc_handle.insert_attribute("style", "cat", p_id_4, Location::default()); assert!(res.is_ok()); let query = Query::new().contains_attribute("style").find_first(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 1); assert_eq!(found_ids, [div_id_2]); } @@ -1230,34 +1620,89 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let mut res = doc.insert_attribute("id", "myid", div_id_2, Location::default()); + let mut res = doc_handle.insert_attribute("id", "myid", div_id_2, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("style", "somestyle", div_id_2, Location::default()); + res = doc_handle.insert_attribute("style", "somestyle", div_id_2, Location::default()); assert!(res.is_ok()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("title", "key", p_id, Location::default()); + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + res = doc_handle.insert_attribute("title", "key", p_id, Location::default()); assert!(res.is_ok()); - let _ = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("style", "otherstyle", div_id_3, Location::default()); + res = doc_handle.insert_attribute("style", "otherstyle", div_id_3, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("id", "otherid", div_id_3, Location::default()); + res = doc_handle.insert_attribute("id", "otherid", div_id_3, Location::default()); assert!(res.is_ok()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 + + let p_id_4 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let p_id_4 = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - res = doc.insert_attribute("title", "yo", p_id_4, Location::default()); + res = doc_handle.insert_attribute("title", "yo", p_id_4, Location::default()); assert!(res.is_ok()); - res = doc.insert_attribute("style", "cat", p_id_4, Location::default()); + res = doc_handle.insert_attribute("style", "cat", p_id_4, Location::default()); assert!(res.is_ok()); let query = Query::new().contains_attribute("style").find_all(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 3); assert_eq!(found_ids, [div_id_2, div_id_3, p_id_4]); } @@ -1271,20 +1716,74 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 - let _ = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().contains_child_tag("p").find_first(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 1); assert_eq!(found_ids, [NodeId::root()]); } @@ -1298,20 +1797,74 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 - let _ = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().contains_child_tag("p").find_all(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 4); assert_eq!(found_ids, [NodeId::root(), div_id, div_id_2, div_id_3]); } @@ -1325,20 +1878,74 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let _ = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 - let _ = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().has_parent_tag("div").find_first(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 1); assert_eq!(found_ids, [div_id_2]); } @@ -1352,43 +1959,138 @@ mod tests { //

//

//

- let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let p_id_2 = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let p_id_2 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let div_id_3 = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let p_id_3 = doc.new_element("p", div_id_3, None, HTML_NAMESPACE, Location::default()); + let div_id_3 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() - let _ = doc.new_element("p", NodeId::root(), None, HTML_NAMESPACE, Location::default()); + let p_id_3 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_3 + + let _ = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() let query = Query::new().has_parent_tag("div").find_all(); - let found_ids = doc.query(&query).unwrap(); + let found_ids = doc_handle.query(&query).unwrap(); assert_eq!(found_ids.len(), 4); assert_eq!(found_ids, [div_id_2, p_id, p_id_2, p_id_3]); } #[test] fn tree_iterator() { - let mut doc = DocumentBuilder::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); //

//
//

first p tag //

second p tag //

third p tag - let div_id = doc.new_element("div", NodeId::root(), None, HTML_NAMESPACE, Location::default()); - let div_id_2 = doc.new_element("div", div_id, None, HTML_NAMESPACE, Location::default()); - let p_id = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let text_id = doc.create_text("first p tag", p_id, Location::default()); - let p_id_2 = doc.new_element("p", div_id_2, None, HTML_NAMESPACE, Location::default()); - let text_id_2 = doc.create_text("second p tag", p_id_2, Location::default()); - let p_id_3 = doc.new_element("p", div_id, None, HTML_NAMESPACE, Location::default()); - let text_id_3 = doc.create_text("third p tag", p_id_3, Location::default()); + let div_id = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // NodeId::root() + + let div_id_2 = Document::new_element( + doc_handle.clone(), + "div", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id - let tree_iterator = TreeIterator::new(&doc); + let p_id = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let text_id = doc_handle.create_text("first p tag", p_id, Location::default()); + let p_id_2 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id_2 + + let text_id_2 = doc_handle.create_text("second p tag", p_id_2, Location::default()); + let p_id_3 = Document::new_element( + doc_handle.clone(), + "p", + Some(HTML_NAMESPACE), + HashMap::new(), + Location::default(), + ); + // div_id + + let text_id_3 = doc_handle.create_text("third p tag", p_id_3, Location::default()); + + let tree_iterator = TreeIterator::new(doc_handle.clone()); let expected_order = vec![ NodeId::root(), @@ -1412,13 +2114,15 @@ mod tests { #[test] fn tree_iterator_mutation() { - let mut doc_handle: DocumentHandle, Css3System> = DocumentBuilder::::new_document(None); + let mut doc_handle: DocumentHandle, Css3System> = + DocumentBuilder::::new_document(None); + let div_id = Document::new_element_node( doc_handle.clone(), "div", Some(HTML_NAMESPACE), HashMap::new(), - Location::default() + Location::default(), ); doc_handle.get_mut().register_node_at(div_id, NodeId::root(), None); @@ -1429,13 +2133,8 @@ mod tests { assert_eq!(current_node_id.unwrap(), NodeId::root()); // we mutate the tree while the iterator is still "open" - let div_id_2 = Document::new_element_node( - doc_handle.clone(), - "div_1", - HTML_NAMESPACE, - None, - Location::default(), - ); + let div_id_2 = + Document::new_element_node(doc_handle.clone(), "div_1", HTML_NAMESPACE, None, Location::default()); current_node_id = tree_iterator.next(); assert_eq!(current_node_id.unwrap(), div_id); diff --git a/examples/html5-parser.rs b/examples/html5-parser.rs index 6ae07518a..98a1f56c0 100644 --- a/examples/html5-parser.rs +++ b/examples/html5-parser.rs @@ -1,6 +1,10 @@ -use gosub_html5::parser::document::{Document, DocumentBuilder}; +use gosub_css3::system::Css3System; +use gosub_html5::doc::builder::DocumentBuilder as DocumentBuilderImpl; +use gosub_html5::doc::document::DocumentImpl; use gosub_html5::parser::Html5Parser; use gosub_shared::byte_stream::{ByteStream, Encoding}; +use gosub_shared::document::DocumentHandle; +use gosub_shared::traits::document::DocumentBuilder; fn main() { // Creates an input stream @@ -9,9 +13,11 @@ fn main() { stream.close(); // Initialize a document and feed it together with the stream to the html5 parser - let document = DocumentBuilder::new_document(None); - let _ = Html5Parser::parse_document(&mut stream, Document::clone(&document), None); + let doc_handle: DocumentHandle, Css3System> = + DocumentBuilderImpl::new_document(None); + + let _ = Html5Parser::parse_document(&mut stream, doc_handle.clone(), None); // document now contains the html5 node tree - println!("Generated tree: \n\n {}", document); + println!("Generated tree: \n\n {}", doc_handle.get()); } diff --git a/src/engine.rs b/src/engine.rs index f04f9b20f..329b675ff 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -164,6 +164,7 @@ mod tests { use super::*; use gosub_css3::system::Css3System; use gosub_html5::doc::document::DocumentImpl; + use gosub_html5::parser::Html5Parser; #[cfg(not(target_arch = "wasm32"))] #[test]