pub type FilenameValidationCallback = Option<unsafe extern "C" fn(cx: *mut JSContext, filename: *const c_char) -> bool>;Expand description
Install a process-wide callback to validate script filenames. The JS engine will invoke this callback for each JS script it parses or XDR decodes.
If the callback returns |false|, an exception is thrown and parsing/decoding will be aborted.
See also CompileOptions::setSkipFilenameValidation to opt-out of the callback for specific parse jobs.
Aliased Type§
pub enum FilenameValidationCallback {
None,
Some(unsafe extern "C" fn(*mut JSContext, *const i8) -> bool),
}Variants§
None
No value.
Some(unsafe extern "C" fn(*mut JSContext, *const i8) -> bool)
Some value of type T.
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.