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

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<SourceList<'a, U, I>> 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>> StructuralEq 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: ?Sized, I> RefUnwindSafe for SourceList<'a, U, I>where I: RefUnwindSafe,

§

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

§

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

§

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

§

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

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere 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 Twhere 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 Twhere 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.