pub struct FileStorage { /* private fields */ }Expand description
Writes each fetch to a directory: base_dir/page/<fragment>.json (metadata) and
base_dir/body/<fragment>.bin (raw body).
Implementations§
Trait Implementations§
Source§impl Clone for FileStorage
impl Clone for FileStorage
Source§fn clone(&self) -> FileStorage
fn clone(&self) -> FileStorage
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 Storage for FileStorage
impl Storage for FileStorage
Source§fn record_fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job: &'life1 CrawlJob,
result: &'life2 FetchResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record_fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job: &'life1 CrawlJob,
result: &'life2 FetchResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist a fetch result. Called after each successful fetch.
Auto Trait Implementations§
impl Freeze for FileStorage
impl RefUnwindSafe for FileStorage
impl Send for FileStorage
impl Sync for FileStorage
impl Unpin for FileStorage
impl UnsafeUnpin for FileStorage
impl UnwindSafe for FileStorage
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