pub struct ReadabilityOptions {
pub max_elems_to_parse: Option<usize>,
pub nb_top_candidates: usize,
pub char_threshold: usize,
pub content_selector: Option<String>,
pub site_profiles: Vec<String>,
pub mobile_viewport_width: Option<usize>,
pub classes_to_preserve: Vec<String>,
pub keep_classes: bool,
pub disable_json_ld: bool,
pub link_density_modifier: f32,
pub media_retention: MediaRetention,
}Expand description
Options for full article extraction.
Defaults are intended for article pages.
Set only the fields that solve a specific input problem.
Fields§
§max_elems_to_parse: Option<usize>Reject documents above this element count before extraction work starts.
nb_top_candidates: usizeNumber of high-scoring roots kept during generic candidate selection.
char_threshold: usizeMinimum extracted text length required to accept an attempt.
content_selector: Option<String>CSS selector for a known article root.
This bypasses generic root scoring for that document. Cleanup, media handling, URL rewriting, Markdown conversion, and diagnostics still run.
site_profiles: Vec<String>TOML site profiles used as URL-scoped extraction hints.
mobile_viewport_width: Option<usize>Viewport width used to recover content hidden behind mobile CSS rules.
classes_to_preserve: Vec<String>Class names kept during cleanup when keep_classes is false.
keep_classes: boolKeep all class attributes in extracted HTML.
disable_json_ld: boolDisable JSON-LD metadata extraction and JSON-LD article-body extraction.
link_density_modifier: f32Adjust link-density cleanup tolerance.
media_retention: MediaRetentionControls whether images, figures, and embeds survive cleanup.
Trait Implementations§
Source§impl Clone for ReadabilityOptions
impl Clone for ReadabilityOptions
Source§fn clone(&self) -> ReadabilityOptions
fn clone(&self) -> ReadabilityOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more