[−][src]Struct content_security_policy::CspList
https://www.w3.org/TR/CSP/#csp-list
Methods
impl CspList[src]
pub fn is_valid(&self) -> bool[src]
pub fn contains_a_header_delivered_content_security_policy(&self) -> bool[src]
https://www.w3.org/TR/CSP/#contains-a-header-delivered-content-security-policy
pub fn parse(
list: &str,
source: PolicySource,
disposition: PolicyDisposition
) -> CspList[src]
list: &str,
source: PolicySource,
disposition: PolicyDisposition
) -> CspList
https://www.w3.org/TR/CSP/#parse-serialized-policy-list
pub fn append(&mut self, other: CspList)[src]
pub fn push(&mut self, policy: Policy)[src]
pub fn report_violations_for_request(&self, request: &Request) -> Vec<Violation>[src]
Given a request, this algorithm reports violations based on client’s "report only" policies.
https://www.w3.org/TR/CSP/#report-for-request
pub fn should_request_be_blocked(
&self,
request: &Request
) -> (CheckResult, Vec<Violation>)[src]
&self,
request: &Request
) -> (CheckResult, Vec<Violation>)
Given a request, this algorithm returns Blocked or Allowed and reports violations based on request’s client’s Content Security Policy.
https://www.w3.org/TR/CSP/#should-block-request
pub fn should_response_to_request_be_blocked(
&self,
request: &Request,
response: &Response
) -> (CheckResult, Vec<Violation>)[src]
&self,
request: &Request,
response: &Response
) -> (CheckResult, Vec<Violation>)
Given a response and a request, this algorithm returns Blocked or Allowed, and reports violations based on request’s client’s Content Security Policy.
https://www.w3.org/TR/CSP/#should-block-response
pub fn should_elements_inline_type_behavior_be_blocked(
&self,
element: &Element,
type_: InlineCheckType,
source: &str
) -> (CheckResult, Vec<Violation>)[src]
&self,
element: &Element,
type_: InlineCheckType,
source: &str
) -> (CheckResult, Vec<Violation>)
https://www.w3.org/TR/CSP/#should-block-inline
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CspList
impl Send for CspList
impl Sync for CspList
impl Unpin for CspList
impl UnwindSafe for CspList
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,