pub struct BfsStrategy;Expand description
A breadth-first crawl strategy.
Always selects the first (oldest) entry from the frontier, giving BFS behavior.
Trait Implementations§
Source§impl Clone for BfsStrategy
impl Clone for BfsStrategy
Source§fn clone(&self) -> BfsStrategy
fn clone(&self) -> BfsStrategy
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 BfsStrategy
Source§impl CrawlStrategy for BfsStrategy
impl CrawlStrategy for BfsStrategy
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 BfsStrategy
impl Debug for BfsStrategy
Source§impl Default for BfsStrategy
impl Default for BfsStrategy
Source§fn default() -> BfsStrategy
fn default() -> BfsStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BfsStrategy
impl RefUnwindSafe for BfsStrategy
impl Send for BfsStrategy
impl Sync for BfsStrategy
impl Unpin for BfsStrategy
impl UnsafeUnpin for BfsStrategy
impl UnwindSafe for BfsStrategy
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