pub struct SiteConfig { /* private fields */ }Expand description
A site configuration.
Implementations§
Source§impl SiteConfig
impl SiteConfig
Sourcepub const fn new(
headers: HeaderMap,
status: StatusConfig,
scheme: SchemeConfig,
max_redirects: usize,
max_age: Duration,
recursive: bool,
) -> Self
pub const fn new( headers: HeaderMap, status: StatusConfig, scheme: SchemeConfig, max_redirects: usize, max_age: Duration, recursive: bool, ) -> Self
Creates a site configuration.
Sourcepub const fn status(&self) -> &StatusConfig
pub const fn status(&self) -> &StatusConfig
Returns a status code configuration.
Sourcepub const fn scheme(&self) -> &SchemeConfig
pub const fn scheme(&self) -> &SchemeConfig
Returns a scheme configuration.
Sourcepub const fn max_redirects(&self) -> usize
pub const fn max_redirects(&self) -> usize
Returns a maximum number of redirects.
Sourcepub const fn recursive(&self) -> bool
pub const fn recursive(&self) -> bool
Returns whether we should validate the website recursively.
Sourcepub fn set_headers(self, headers: HeaderMap) -> Self
pub fn set_headers(self, headers: HeaderMap) -> Self
Sets request headers.
Sourcepub fn set_status(self, status: StatusConfig) -> Self
pub fn set_status(self, status: StatusConfig) -> Self
Sets a status code configuration.
Sourcepub fn set_scheme(self, scheme: SchemeConfig) -> Self
pub fn set_scheme(self, scheme: SchemeConfig) -> Self
Sets a scheme configuration.
Sourcepub const fn set_max_redirects(self, count: usize) -> Self
pub const fn set_max_redirects(self, count: usize) -> Self
Sets a maximum number of redirects.
Sourcepub const fn set_max_age(self, age: Duration) -> Self
pub const fn set_max_age(self, age: Duration) -> Self
Sets a maximum cache age.
Sourcepub const fn set_recursive(self, recursive: bool) -> Self
pub const fn set_recursive(self, recursive: bool) -> Self
Sets whether we should validate the website recursively
Trait Implementations§
Source§impl Clone for SiteConfig
impl Clone for SiteConfig
Source§fn clone(&self) -> SiteConfig
fn clone(&self) -> SiteConfig
Returns a copy 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 SiteConfig
impl Debug for SiteConfig
Source§impl Default for SiteConfig
impl Default for SiteConfig
Source§fn default() -> SiteConfig
fn default() -> SiteConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SiteConfig
impl RefUnwindSafe for SiteConfig
impl Send for SiteConfig
impl Sync for SiteConfig
impl Unpin for SiteConfig
impl UnwindSafe for SiteConfig
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