unobtanium 3.0.0

Opinioated Web search engine library with crawler and viewer companion.
Documentation
use serde::{Serialize,Deserialize};
use url::Url;

use crate::content::InformationSource;

/// Represents general information about a redirect.
///
/// Both useful in [crawling] and summary context.
///
/// [crawling]: crate::crawling::Redirect
#[derive(Clone,Debug,Serialize,Deserialize)]
pub struct RedirectData {

	/// The url the redirect ends up in.
	pub to_url: Url,

	/// Where the redirect was signalled.
	pub information_source: InformationSource,

	/// If the redirect is intentionally or explicitly
	/// signalled as a permanent redirect.
	pub is_permanent: bool,

	/// If the redirect is part of a security policy
	/// (i.e. HSTS or a local http to https redirect).
	pub by_security_policy: bool,

}