pub struct HstsPolicy {
pub max_age: Duration,
pub include_subdomains: bool,
pub preload: bool,
}Expand description
HTTP Strict Transport Security declaration.
Fields§
§max_age: DurationBrowser HSTS duration.
include_subdomains: boolWhether the policy covers subdomains.
preload: boolWhether the site requests browser preload registration.
Implementations§
Source§impl HstsPolicy
impl HstsPolicy
Sourcepub fn new(max_age: Duration) -> SoapResult<Self>
pub fn new(max_age: Duration) -> SoapResult<Self>
Creates a non-zero HSTS policy.
Sourcepub const fn include_subdomains(self) -> Self
pub const fn include_subdomains(self) -> Self
Applies HSTS to subdomains.
Trait Implementations§
Source§impl Clone for HstsPolicy
impl Clone for HstsPolicy
Source§fn clone(&self) -> HstsPolicy
fn clone(&self) -> HstsPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HstsPolicy
Source§impl Debug for HstsPolicy
impl Debug for HstsPolicy
impl Eq for HstsPolicy
Source§impl PartialEq for HstsPolicy
impl PartialEq for HstsPolicy
impl StructuralPartialEq for HstsPolicy
Auto Trait Implementations§
impl Freeze for HstsPolicy
impl RefUnwindSafe for HstsPolicy
impl Send for HstsPolicy
impl Sync for HstsPolicy
impl Unpin for HstsPolicy
impl UnsafeUnpin for HstsPolicy
impl UnwindSafe for HstsPolicy
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