pub struct InMemoryFrontier { /* private fields */ }Expand description
A simple in-memory URL frontier with deduplication.
Uses BFS ordering (FIFO) by default.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryFrontier
impl Debug for InMemoryFrontier
Source§impl Default for InMemoryFrontier
impl Default for InMemoryFrontier
Source§impl Frontier for InMemoryFrontier
impl Frontier for InMemoryFrontier
Source§fn push<'life0, 'async_trait>(
&'life0 self,
entry: FrontierEntry,
) -> Pin<Box<dyn Future<Output = Result<(), CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn push<'life0, 'async_trait>(
&'life0 self,
entry: FrontierEntry,
) -> Pin<Box<dyn Future<Output = Result<(), CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Push a new entry onto the frontier.
Source§fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<FrontierEntry>, CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<FrontierEntry>, CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pop the next entry from the frontier.
Source§fn pop_batch<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<FrontierEntry>, CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pop_batch<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<FrontierEntry>, CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pop up to
n entries from the frontier.Source§fn is_seen<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_seen<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check whether a URL has already been seen.
Source§fn mark_seen<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_seen<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CrawlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark a URL as seen.
Auto Trait Implementations§
impl !Freeze for InMemoryFrontier
impl RefUnwindSafe for InMemoryFrontier
impl Send for InMemoryFrontier
impl Sync for InMemoryFrontier
impl Unpin for InMemoryFrontier
impl UnsafeUnpin for InMemoryFrontier
impl UnwindSafe for InMemoryFrontier
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