[][src]Struct csp::CSP

pub struct CSP<'a>(_);

The starting point for building a Content Security Policy.

You'll add Directive into this struct, and later on call .to_string() on it to get it as a header compatible string. Doesn't include content-security-policy: part in it though.

Methods

impl<'a> CSP<'a>[src]

pub fn new() -> Self[src]

pub fn new_with(directive: Directive<'a>) -> Self[src]

pub fn add_borrowed<'b>(&'b mut self, directive: Directive<'a>) -> &'b mut Self[src]

pub fn add(self, directive: Directive<'a>) -> Self[src]

Trait Implementations

impl<'a> Clone for CSP<'a>[src]

impl<'a> Debug for CSP<'a>[src]

impl<'a> Display for CSP<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for CSP<'a>

impl<'a> Send for CSP<'a>

impl<'a> Sync for CSP<'a>

impl<'a> Unpin for CSP<'a>

impl<'a> UnwindSafe for CSP<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.