pub struct NodeScoreStore { /* private fields */ }Expand description
An external store that maps DOM nodes to readability metadata without mutating the nodes themselves.
NodeRef values are reference-counted and cannot hold arbitrary
side-channel data, so the scorer keeps a HashMap keyed by the
underlying pointer address. Each call to crate::extract produces
its own NodeScoreStore; scores are not shared across extractions.
§Examples
use readable_rs::parser::parse_html;
use readable_rs::NodeScoreStore;
let doc = parse_html("<div><p>hello</p></div>");
let store = NodeScoreStore::default();
// store is empty — scores are populated internally during extraction.Trait Implementations§
Source§impl Clone for NodeScoreStore
impl Clone for NodeScoreStore
Source§fn clone(&self) -> NodeScoreStore
fn clone(&self) -> NodeScoreStore
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 NodeScoreStore
impl Debug for NodeScoreStore
Source§impl Default for NodeScoreStore
impl Default for NodeScoreStore
Source§fn default() -> NodeScoreStore
fn default() -> NodeScoreStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeScoreStore
impl RefUnwindSafe for NodeScoreStore
impl Send for NodeScoreStore
impl Sync for NodeScoreStore
impl Unpin for NodeScoreStore
impl UnwindSafe for NodeScoreStore
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