pub struct ReadabilityOptions {
pub debug: bool,
pub max_elems_to_parse: usize,
pub nb_top_candidates: usize,
pub char_threshold: usize,
pub classes_to_preserve: Vec<String>,
pub keep_classes: bool,
pub disable_json_ld: bool,
pub allowed_video_regex: Option<Regex>,
pub link_density_modifier: f64,
pub flags: ReadabilityFlags,
}Expand description
Configuration options for the Readability parser
Fields§
§debug: boolWhether to enable debug logging
max_elems_to_parse: usizeMaximum number of elements to parse (0 = no limit)
nb_top_candidates: usizeNumber of top candidates to consider
char_threshold: usizeMinimum character threshold for content
classes_to_preserve: Vec<String>CSS classes to preserve during cleanup
keep_classes: boolWhether to keep CSS classes
disable_json_ld: boolWhether to disable JSON-LD parsing
allowed_video_regex: Option<Regex>Custom allowed video regex pattern
link_density_modifier: f64Link density modifier
flags: ReadabilityFlagsFeature flags for controlling algorithm behavior
Trait Implementations§
Source§impl Clone for ReadabilityOptions
impl Clone for ReadabilityOptions
Source§fn clone(&self) -> ReadabilityOptions
fn clone(&self) -> ReadabilityOptions
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 ReadabilityOptions
impl Debug for ReadabilityOptions
Auto Trait Implementations§
impl Freeze for ReadabilityOptions
impl RefUnwindSafe for ReadabilityOptions
impl Send for ReadabilityOptions
impl Sync for ReadabilityOptions
impl Unpin for ReadabilityOptions
impl UnwindSafe for ReadabilityOptions
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