pub(crate) trait CollectionSource: JSTraceable {
// Required method
fn iter<'b>(
&'b self,
no_gc: &'b NoGC,
root: &'b Node,
) -> Box<dyn Iterator<Item = UnrootedDom<'b, Element>> + 'b>;
}Expand description
Alternative to CollectionFilter that provides elements directly via
a custom iterator, rather than filtering a tree traversal. This is more
efficient when the collection’s elements can be enumerated directly
(e.g. selectedOptions iterating only the select’s list of options).
Required Methods§
fn iter<'b>( &'b self, no_gc: &'b NoGC, root: &'b Node, ) -> Box<dyn Iterator<Item = UnrootedDom<'b, Element>> + 'b>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".