Enum html_diff::Difference
[−]
[src]
pub enum Difference { NodeType { elem: ElementInformation, opposite_elem: ElementInformation, }, NodeName { elem: ElementInformation, opposite_elem: ElementInformation, }, NodeAttributes { elem: ElementInformation, elem_attributes: HashMap<String, String>, opposite_elem: ElementInformation, opposite_elem_attributes: HashMap<String, String>, }, NodeText { elem: ElementInformation, elem_text: String, opposite_elem: ElementInformation, opposite_elem_text: String, }, NotPresent { elem: Option<ElementInformation>, opposite_elem: Option<ElementInformation>, }, }
Contains the kind of difference and some information.
Variants
NodeType
Different node types at the same place (text vs data for example).
Fields of NodeType
elem: ElementInformation | |
opposite_elem: ElementInformation |
NodeName
Different node names (div
vs ul
for example).
Fields of NodeName
elem: ElementInformation | |
opposite_elem: ElementInformation |
NodeAttributes
Different attributes for two nodes.
Fields of NodeAttributes
elem: ElementInformation | |
elem_attributes: HashMap<String, String> | |
opposite_elem: ElementInformation | |
opposite_elem_attributes: HashMap<String, String> |
NodeText
Different text content for two nodes.
Fields of NodeText
elem: ElementInformation | |
elem_text: String | |
opposite_elem: ElementInformation | |
opposite_elem_text: String |
NotPresent
If an element isn't present in one of the two sides.
Fields of NotPresent
elem: Option<ElementInformation> | |
opposite_elem: Option<ElementInformation> |
Methods
impl Difference
[src]
fn is_node_type(&self) -> bool
fn is_node_name(&self) -> bool
fn is_node_attributes(&self) -> bool
fn is_node_text(&self) -> bool
fn is_not_present(&self) -> bool
Trait Implementations
impl Debug for Difference
[src]
impl Clone for Difference
[src]
fn clone(&self) -> Difference
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more