Struct content_security_policy::SourceList

source ·
pub(crate) struct SourceList<'a, U: 'a + ?Sized + Borrow<str>, I: Clone + IntoIterator<Item = &'a U>>(pub(crate) I);
Expand description

https://www.w3.org/TR/CSP/#framework-directive-source-list

Tuple Fields§

§0: I

Implementations§

source§

impl<'a, U: 'a + ?Sized + Borrow<str>, I: Clone + IntoIterator<Item = &'a U>> SourceList<'a, U, I>

source

pub(crate) fn does_nonce_match_source_list(&self, nonce: &str) -> MatchResult

https://www.w3.org/TR/CSP/#match-nonce-to-source-list

source

pub(crate) fn does_request_match_source_list( &self, request: &Request, ) -> MatchResult

https://www.w3.org/TR/CSP/#match-request-to-source-list

source

pub(crate) fn does_url_match_source_list_in_origin_with_redirect_count( &self, url: &Url, origin: &Origin, redirect_count: u32, ) -> MatchResult

https://www.w3.org/TR/CSP/#match-url-to-source-list

source

pub(crate) fn does_element_match_source_list_for_type_and_source( &self, element: &Element<'_>, type_: InlineCheckType, source: &str, ) -> MatchResult

https://www.w3.org/TR/CSP/#match-element-to-source-list

source

pub(crate) fn does_a_source_list_allow_all_inline_behavior_for_type( &self, type_: InlineCheckType, ) -> AllowResult

https://www.w3.org/TR/CSP/#allow-all-inline

source

pub(crate) fn does_response_to_request_match_source_list( &self, request: &Request, response: &Response, ) -> MatchResult

https://www.w3.org/TR/CSP/#match-response-to-source-list

source

pub(crate) fn does_a_source_list_allow_js_evaluation( &self, disposition: &PolicyDisposition, ) -> AllowResult

https://www.w3.org/TR/CSP/#can-compile-strings

source

pub(crate) fn does_a_source_list_allow_wasm_evaluation( &self, disposition: &PolicyDisposition, ) -> AllowResult

https://www.w3.org/TR/CSP/#can-compile-wasm-bytes

Trait Implementations§

source§

impl<'a, U: Clone + 'a + ?Sized + Borrow<str>, I: Clone + Clone + IntoIterator<Item = &'a U>> Clone for SourceList<'a, U, I>

source§

fn clone(&self) -> SourceList<'a, U, I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, U: Debug + 'a + ?Sized + Borrow<str>, I: Debug + Clone + IntoIterator<Item = &'a U>> Debug for SourceList<'a, U, I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, U: PartialEq + 'a + ?Sized + Borrow<str>, I: PartialEq + Clone + IntoIterator<Item = &'a U>> PartialEq for SourceList<'a, U, I>

source§

fn eq(&self, other: &SourceList<'a, U, I>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, U: Copy + 'a + ?Sized + Borrow<str>, I: Copy + Clone + IntoIterator<Item = &'a U>> Copy for SourceList<'a, U, I>

source§

impl<'a, U: Eq + 'a + ?Sized + Borrow<str>, I: Eq + Clone + IntoIterator<Item = &'a U>> Eq for SourceList<'a, U, I>

source§

impl<'a, U: 'a + ?Sized + Borrow<str>, I: Clone + IntoIterator<Item = &'a U>> StructuralPartialEq for SourceList<'a, U, I>

Auto Trait Implementations§

§

impl<'a, U, I> Freeze for SourceList<'a, U, I>
where I: Freeze, U: ?Sized,

§

impl<'a, U, I> RefUnwindSafe for SourceList<'a, U, I>
where I: RefUnwindSafe, U: ?Sized,

§

impl<'a, U, I> Send for SourceList<'a, U, I>
where I: Send, U: ?Sized,

§

impl<'a, U, I> Sync for SourceList<'a, U, I>
where I: Sync, U: ?Sized,

§

impl<'a, U, I> Unpin for SourceList<'a, U, I>
where I: Unpin, U: ?Sized,

§

impl<'a, U, I> UnwindSafe for SourceList<'a, U, I>
where I: UnwindSafe, U: ?Sized,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T