Struct tauri_codegen::embedded_assets::CspHashes
source · 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