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>,
},
}
Expand description
Contains the kind of difference and some information.
Variants§
NodeType
Different node types at the same place (text vs data for example).
NodeName
Different node names (div
vs ul
for example).
NodeAttributes
Different attributes for two nodes.
NodeText
Different text content for two nodes.
NotPresent
If an element isn’t present in one of the two sides.
Implementations§
Source§impl Difference
impl Difference
pub fn is_node_type(&self) -> bool
pub fn is_node_name(&self) -> bool
pub fn is_node_attributes(&self) -> bool
pub fn is_node_text(&self) -> bool
pub fn is_not_present(&self) -> bool
Trait Implementations§
Source§impl Clone for Difference
impl Clone for Difference
Source§fn clone(&self) -> Difference
fn clone(&self) -> Difference
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Difference
impl Debug for Difference
Source§impl PartialEq for Difference
impl PartialEq for Difference
Source§impl ToString for Difference
impl ToString for Difference
impl StructuralPartialEq for Difference
Auto Trait Implementations§
impl Freeze for Difference
impl RefUnwindSafe for Difference
impl Send for Difference
impl Sync for Difference
impl Unpin for Difference
impl UnwindSafe for Difference
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)