pub struct ParseConfig {
pub max_depth: usize,
pub preserve_whitespace: bool,
pub include_comments: bool,
}Expand description
Configuration for HTML parsing behavior.
§Example
use scrape_core::ParseConfig;
let config = ParseConfig { max_depth: 256, preserve_whitespace: true, include_comments: false };Fields§
§max_depth: usizeMaximum nesting depth for the DOM tree.
Parsing will return ParseError::MaxDepthExceeded if this limit is exceeded.
Default: 512.
preserve_whitespace: boolWhether to preserve whitespace-only text nodes.
When false (default), text nodes containing only whitespace are filtered out.
include_comments: boolWhether to include comment nodes in the parsed document.
Default: false.
Trait Implementations§
Source§impl Clone for ParseConfig
impl Clone for ParseConfig
Source§fn clone(&self) -> ParseConfig
fn clone(&self) -> ParseConfig
Returns a duplicate 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 ParseConfig
impl Debug for ParseConfig
Auto Trait Implementations§
impl Freeze for ParseConfig
impl RefUnwindSafe for ParseConfig
impl Send for ParseConfig
impl Sync for ParseConfig
impl Unpin for ParseConfig
impl UnwindSafe for ParseConfig
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