FilenameValidationCallback

Type Alias FilenameValidationCallback 

Source
pub type FilenameValidationCallback = Option<unsafe extern "C" fn(*mut JSContext, *const i8) -> 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§

§1.0.0

None

No value.

§1.0.0

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.