pub struct Scorer<'a> { /* private fields */ }Implementations§
Source§impl<'a> Scorer<'a>
impl<'a> Scorer<'a>
pub fn new(options: ScorerOptions<'a>) -> Self
pub fn preprocess( &self, dom: &mut RcDom, handle: Handle, title: &mut String, ) -> bool
Sourcepub fn find_candidates(
&self,
node_id: &Path,
handle: Handle,
candidates: &mut BTreeMap<String, Candidate>,
nodes: &mut BTreeMap<String, Rc<Node>>,
)
pub fn find_candidates( &self, node_id: &Path, handle: Handle, candidates: &mut BTreeMap<String, Candidate>, nodes: &mut BTreeMap<String, Rc<Node>>, )
Find candidate tags in DOM node, and distribute score among them.
pub fn find_top_candidate( &self, candidates: &'a BTreeMap<String, Candidate>, ) -> Option<TopCandidate<'a>>
pub fn clean( &self, dom: &mut RcDom, id: &Path, handle: Handle, url: &Url, candidates: &BTreeMap<String, Candidate>, ) -> bool
Auto Trait Implementations§
impl<'a> Freeze for Scorer<'a>
impl<'a> RefUnwindSafe for Scorer<'a>
impl<'a> Send for Scorer<'a>
impl<'a> Sync for Scorer<'a>
impl<'a> Unpin for Scorer<'a>
impl<'a> UnwindSafe for Scorer<'a>
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