pub struct DfsStrategy;Expand description
A depth-first crawl strategy.
Always selects the last (newest) entry from the working set, giving LIFO / DFS behavior.
Trait Implementations§
Source§impl Clone for DfsStrategy
impl Clone for DfsStrategy
Source§fn clone(&self) -> DfsStrategy
fn clone(&self) -> DfsStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DfsStrategy
Source§impl CrawlStrategy for DfsStrategy
impl CrawlStrategy for DfsStrategy
Source§fn select_next(&self, candidates: &[FrontierEntry]) -> Option<usize>
fn select_next(&self, candidates: &[FrontierEntry]) -> Option<usize>
Select the next URL to crawl from a set of candidates.
Returns the index into
candidates, or None if none should be selected.Source§fn should_continue(&self, stats: &CrawlStats) -> bool
fn should_continue(&self, stats: &CrawlStats) -> bool
Whether the crawl should continue given current stats.
Source§fn on_page_processed(&self, _page: &CrawlPageResult)
fn on_page_processed(&self, _page: &CrawlPageResult)
Called after each page is processed. Used by adaptive strategies to track content.
Source§impl Debug for DfsStrategy
impl Debug for DfsStrategy
Source§impl Default for DfsStrategy
impl Default for DfsStrategy
Source§fn default() -> DfsStrategy
fn default() -> DfsStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DfsStrategy
impl RefUnwindSafe for DfsStrategy
impl Send for DfsStrategy
impl Sync for DfsStrategy
impl Unpin for DfsStrategy
impl UnsafeUnpin for DfsStrategy
impl UnwindSafe for DfsStrategy
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