pub trait Tok {
// Required methods
fn is_match(&self, qual_name: &QualName) -> bool;
fn process(
&mut self,
attributes: &mut Vec<Attribute>,
children: &mut Vec<Handle>
);
}
Expand description
Tok in short for token which is used to recursively walk
through rcdom::Handle
when QualName
match is found
process
function is called.
Combining Tok’s into Vec makes it advantageous to walk HTML DOM only once and collect all interested elements.