Enum html_streaming_editor::Command
source · [−]pub enum Command<'a> {
Show 13 variants
Only(CssSelectorList<'a>),
Without(CssSelectorList<'a>),
ForEach(CssSelectorList<'a>, Pipeline<'a>),
Replace(CssSelectorList<'a>, Pipeline<'a>),
ClearAttribute(String),
ClearContent,
SetAttribute(String, ValueSource),
SetTextContent(ValueSource),
AddTextContent(ValueSource),
AddComment(ValueSource),
AddElement(Pipeline<'a>),
CreateElement(String),
ReadFrom(String),
}
Variants
Only(CssSelectorList<'a>)
Find all nodes, beginning at the input, that match the given CSS selector and return only those
Without(CssSelectorList<'a>)
Find all nodes, beginning at the input, that match the given CSS selector and remove them from their parent nodes. Returns the input as result.
ForEach(CssSelectorList<'a>, Pipeline<'a>)
runs a sub-pipeline on each element matching the given CSS selector Returns the input as result.
Replace(CssSelectorList<'a>, Pipeline<'a>)
runs a sub-pipeline and replaces each element matching the given CSS selector with the result of the pipeline Returns the input as result.
ClearAttribute(String)
Remove the given attribute from all currently selected nodes Returns the input as result.
ClearContent
Remove all children of the currently selected nodes Returns the input as result
SetAttribute(String, ValueSource)
Add or Reset a given attribute with a new value Returns the input as result.
SetTextContent(ValueSource)
Remove all children of the currently selected nodes and add a new text as child instead Returns the input as result.
AddTextContent(ValueSource)
adds a new text as child Returns the input as result.
AddComment(ValueSource)
adds a new comment as child Returns the input as result.
AddElement(Pipeline<'a>)
runs a sub-pipeline and adds the result as child Returns the input as result.
CreateElement(String)
creates an HTML element of given type Returns the created element as result.
ReadFrom(String)
reads a different file into memory Returns the content of that file as result.