pub struct ExportState {
pub domain: String,
pub processed_urls: Vec<String>,
pub last_export: Option<DateTime<Utc>>,
pub total_exported: u64,
}Expand description
Metadata for the export state file
Stored at ~/.cache/rust-scraper/state/
Fields§
§domain: StringDomain this state belongs to (e.g., “example.com”)
processed_urls: Vec<String>URLs that have been successfully exported
last_export: Option<DateTime<Utc>>Last export timestamp
total_exported: u64Total documents exported
Implementations§
Source§impl ExportState
impl ExportState
Sourcepub fn mark_processed(&mut self, url: &str)
pub fn mark_processed(&mut self, url: &str)
Mark a URL as processed
Sourcepub fn is_processed(&self, url: &str) -> bool
pub fn is_processed(&self, url: &str) -> bool
Check if a URL has been processed
Sourcepub fn update_timestamp(&mut self)
pub fn update_timestamp(&mut self)
Update last export timestamp
Trait Implementations§
Source§impl Clone for ExportState
impl Clone for ExportState
Source§fn clone(&self) -> ExportState
fn clone(&self) -> ExportState
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 Debug for ExportState
impl Debug for ExportState
Source§impl Default for ExportState
impl Default for ExportState
Source§fn default() -> ExportState
fn default() -> ExportState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExportState
impl<'de> Deserialize<'de> for ExportState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExportState
impl RefUnwindSafe for ExportState
impl Send for ExportState
impl Sync for ExportState
impl Unpin for ExportState
impl UnsafeUnpin for ExportState
impl UnwindSafe for ExportState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more