[−][src]Trait toks::Tok
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.
Required methods
fn is_match(&self, qual_name: &QualName) -> bool
Matcher function which matches predefined QualName.
Depending on the result of boolean match this allows process function to proceed.
fn process(
&mut self,
attributes: RefCell<Vec<Attribute>>,
children: RefCell<Vec<Handle>>
)
&mut self,
attributes: RefCell<Vec<Attribute>>,
children: RefCell<Vec<Handle>>
)
Process function gets matched QualName attributes and children of matched element.