pub struct HttpCsp {
pub default_src: Option<String>,
pub script_src: Option<String>,
pub style_src: Option<String>,
pub font_src: Option<String>,
pub img_src: Option<String>,
pub frame_src: Option<String>,
pub include_inline_hashes: Option<bool>,
}Fields§
§default_src: Option<String>defaults to 'self' (default-src does not need to be included)
script_src: Option<String>defaults to unset unless inline hashes are included,
in which case the directive will start with 'self' (script-src does not need to be included).
style_src: Option<String>defaults to unset unless inline hashes are included,
in which case the directive will start with 'self' (style-src does not need to be included).
font_src: Option<String>defaults to unset.
(font-src does not need to be included).
img_src: Option<String>defaults to unset.
(img-src does not need to be included).
frame_src: Option<String>defaults to unset.
(frame-src does not need to be included).
include_inline_hashes: Option<bool>defaults to true.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HttpCsp
impl<'de> Deserialize<'de> for HttpCsp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for HttpCsp
Available on crate feature docs only.
impl JsonSchema for HttpCsp
Available on crate feature
docs only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for HttpCsp
impl RefUnwindSafe for HttpCsp
impl Send for HttpCsp
impl Sync for HttpCsp
impl Unpin for HttpCsp
impl UnsafeUnpin for HttpCsp
impl UnwindSafe for HttpCsp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more