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
Auto Trait Implementations§
impl Freeze for AssetOptions
impl RefUnwindSafe for AssetOptions
impl Send for AssetOptions
impl Sync for AssetOptions
impl Unpin for AssetOptions
impl UnwindSafe for AssetOptions
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