pub struct ZeroJsConfig {
pub allowed_js_patterns: Vec<String>,
pub allowed_css_patterns: Vec<String>,
pub skip_paths: Vec<PathBuf>,
pub require_manifest: bool,
pub check_dangerous_patterns: bool,
pub wasm_marker: String,
pub allow_wasm_inline_scripts: bool,
}Expand description
Zero-JS validator configuration
Fields§
§allowed_js_patterns: Vec<String>Allowed JS files (must have manifest verification)
allowed_css_patterns: Vec<String>Allowed CSS files (generated by builders)
skip_paths: Vec<PathBuf>Paths to skip during validation
require_manifest: boolWhether to require manifest for all JS files
check_dangerous_patterns: boolWhether to check for dangerous patterns
wasm_marker: StringWASM generation marker to look for in HTML
allow_wasm_inline_scripts: boolWhether inline scripts are allowed if WASM-generated
Implementations§
Source§impl ZeroJsConfig
impl ZeroJsConfig
Sourcepub fn development() -> Self
pub fn development() -> Self
Create permissive configuration (for development)
Sourcepub fn with_allowed_js(self, pattern: impl Into<String>) -> Self
pub fn with_allowed_js(self, pattern: impl Into<String>) -> Self
Add an allowed JS pattern
Sourcepub fn with_skip_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_skip_path(self, path: impl Into<PathBuf>) -> Self
Add a path to skip
Trait Implementations§
Source§impl Clone for ZeroJsConfig
impl Clone for ZeroJsConfig
Source§fn clone(&self) -> ZeroJsConfig
fn clone(&self) -> ZeroJsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZeroJsConfig
impl Debug for ZeroJsConfig
Auto Trait Implementations§
impl Freeze for ZeroJsConfig
impl RefUnwindSafe for ZeroJsConfig
impl Send for ZeroJsConfig
impl Sync for ZeroJsConfig
impl Unpin for ZeroJsConfig
impl UnsafeUnpin for ZeroJsConfig
impl UnwindSafe for ZeroJsConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().