unobtanium 3.0.0

Opinioated Web search engine library with crawler and viewer companion.
Documentation

use serde::{Serialize,Deserialize};

use crate::database::id::{CrawlLogEntryId, RequestId};
use crate::time::UtcTimestamp;
use crate::url::UrlWithoutFragment;

/// Shared Data between a [File] and a [Redirect]
///
/// [File]: crate::crawling::File
/// [Redirect]: crate::crawling::Redirect
#[derive(Clone,Debug,Serialize,Deserialize)]
pub struct CrawlOutputMetadata {
	/// Numeric id of the entry in the crawl_log
	#[serde(skip)]
	pub crawl_log_entry: CrawlLogEntryId,

	/// Numeric id of the request that resulted in this file
	/// (if it was fetched over a network)
	#[serde(skip)]
	pub request_id: Option<RequestId>,

	/// The url that can be used to obtain an up to date copy of the file.
	pub url: UrlWithoutFragment,

	/// When the file was last modified according to file metadata.
	///
	/// This date may come from Filesystem metadata, Archive metadata,
	/// the HTTP `last-modified` header or similar.
	pub last_modified: Option<UtcTimestamp>,

}