pub struct CspHashes { /* private fields */ }
Expand description
Holds all hashes that we will apply on the CSP tag/header.
Implementations§
Source§impl CspHashes
impl CspHashes
Sourcepub fn add_if_applicable(
&mut self,
entry: &DirEntry,
dangerous_disable_asset_csp_modification: &DisabledCspModificationKind,
) -> Result<(), EmbeddedAssetsError>
pub fn add_if_applicable( &mut self, entry: &DirEntry, dangerous_disable_asset_csp_modification: &DisabledCspModificationKind, ) -> Result<(), EmbeddedAssetsError>
Only add a CSP hash to the appropriate category if we think the file matches
Note: this only checks the file extension, much like how a browser will assume a .js file is a JavaScript file unless HTTP headers tell it otherwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CspHashes
impl RefUnwindSafe for CspHashes
impl Send for CspHashes
impl Sync for CspHashes
impl Unpin for CspHashes
impl UnwindSafe for CspHashes
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