Skip to main content

PolicyDecisionExt

Trait PolicyDecisionExt 

Source
pub trait PolicyDecisionExt: IsA<PolicyDecision> + 'static {
    // Provided methods
    fn download(&self) { ... }
    fn ignore(&self) { ... }
    fn use_(&self) { ... }
    fn use_with_policies(&self, policies: &WebsitePolicies) { ... }
}
Expand description

Provided Methods§

Source

fn download(&self)

Spawn a download from this decision.

Source

fn ignore(&self)

ResponsePolicyDecision, this would cancel the request.

Ignore the action which triggered this decision. For instance, for a ResponsePolicyDecision, this would cancel the request.

Source

fn use_(&self)

Accept the action which triggered this decision.

Source

fn use_with_policies(&self, policies: &WebsitePolicies)

Accept the navigation action and continue with provided policies.

Accept the navigation action which triggered this decision, and continue with policies affecting all subsequent loads of resources in the origin associated with the accepted navigation action.

For example, a navigation decision to a video sharing website may be accepted under the priviso no movies are allowed to autoplay. The autoplay policy in this case would be set in the policies.

§policies

a WebsitePolicies

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§