pub struct HtmlComparer { /* private fields */ }
Expand description
Main struct for comparing HTML
Implementations§
Source§impl HtmlComparer
impl HtmlComparer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new HTML comparer with default options.
Note about whitespace handling:
- Multiple spaces in text content are collapsed into a single space (standard HTML behavior)
- Whitespace between elements is ignored by default
- Setting
ignore_whitespace: false
only affects element whitespace, not text content - Special elements like
and attributes like xml:space are treated the same as regular elements
Sourcepub fn with_options(options: HtmlCompareOptions) -> Self
pub fn with_options(options: HtmlCompareOptions) -> Self
Create a new HTML comparer with custom options
Trait Implementations§
Source§impl Debug for HtmlComparer
impl Debug for HtmlComparer
Auto Trait Implementations§
impl Freeze for HtmlComparer
impl RefUnwindSafe for HtmlComparer
impl Send for HtmlComparer
impl Sync for HtmlComparer
impl Unpin for HtmlComparer
impl UnwindSafe for HtmlComparer
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