Trait soup::prelude::HSTSEnforcerExt
source · pub trait HSTSEnforcerExt: IsA<HSTSEnforcer> + Sealed + 'static {
// Provided methods
fn domains(&self, session_policies: bool) -> Vec<GString> { ... }
fn policies(&self, session_policies: bool) -> Vec<HSTSPolicy> { ... }
fn has_valid_policy(&self, domain: &str) -> bool { ... }
fn is_persistent(&self) -> bool { ... }
fn set_policy(&self, policy: &mut HSTSPolicy) { ... }
fn set_session_policy(&self, domain: &str, include_subdomains: bool) { ... }
fn connect_changed<F: Fn(&Self, &HSTSPolicy, &HSTSPolicy) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn policies(&self, session_policies: bool) -> Vec<HSTSPolicy>
fn policies(&self, session_policies: bool) -> Vec<HSTSPolicy>
sourcefn has_valid_policy(&self, domain: &str) -> bool
fn has_valid_policy(&self, domain: &str) -> bool
sourcefn is_persistent(&self) -> bool
fn is_persistent(&self) -> bool
sourcefn set_policy(&self, policy: &mut HSTSPolicy)
fn set_policy(&self, policy: &mut HSTSPolicy)
Sets @policy to @self.
If @policy is expired, any existing HSTS policy for its host will be removed
instead. If a policy existed for this host, it will be replaced. Otherwise,
the new policy will be inserted. If the policy is a session policy, that is,
one created with HSTSPolicy::new_session_policy()
, the policy will not
expire and will be enforced during the lifetime of @self’s
Session
.
§policy
the policy of the HSTS host
sourcefn set_session_policy(&self, domain: &str, include_subdomains: bool)
fn set_session_policy(&self, domain: &str, include_subdomains: bool)
sourcefn connect_changed<F: Fn(&Self, &HSTSPolicy, &HSTSPolicy) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_changed<F: Fn(&Self, &HSTSPolicy, &HSTSPolicy) + 'static>( &self, f: F ) -> SignalHandlerId
Emitted when @hsts_enforcer changes.
If a policy has been added,
@new_policy will contain the newly-added policy and
@old_policy will be None
. If a policy has been deleted,
@old_policy will contain the to-be-deleted policy and
@new_policy will be None
. If a policy has been changed,
@old_policy will contain its old value, and @new_policy its
new value.
Note that you shouldn’t modify the policies from a callback to this signal.
§old_policy
the old #SoupHSTSPolicy value
§new_policy
the new #SoupHSTSPolicy value