Struct tauri_codegen::embedded_assets::AssetOptions  
source · pub struct AssetOptions { /* private fields */ }Expand description
Options used to embed assets.
Implementations§
source§impl AssetOptions
 
impl AssetOptions
sourcepub fn new(pattern: PatternKind) -> Self
 
pub fn new(pattern: PatternKind) -> Self
Creates the default asset options.
sourcepub fn with_csp(self) -> Self
 
pub fn with_csp(self) -> Self
Instruct the asset handler to inject the CSP token to HTML files (Linux only) and add asset nonces and hashes to the policy.
sourcepub fn freeze_prototype(self, freeze: bool) -> Self
 
pub fn freeze_prototype(self, freeze: bool) -> Self
Instruct the asset handler to include a script to freeze the Object.prototype on all HTML files.
sourcepub fn dangerous_disable_asset_csp_modification(
    self,
    dangerous_disable_asset_csp_modification: DisabledCspModificationKind
) -> Self
 
pub fn dangerous_disable_asset_csp_modification( self, dangerous_disable_asset_csp_modification: DisabledCspModificationKind ) -> Self
Instruct the asset handler to NOT modify the CSP. This is NOT recommended.
Trait Implementations§
source§impl Default for AssetOptions
 
impl Default for AssetOptions
source§fn default() -> AssetOptions
 
fn default() -> AssetOptions
Returns the “default value” for a type. Read more