Function chakracore_sys::JsSerialize [] [src]

pub unsafe extern "system" fn JsSerialize(
    script: JsValueRef,
    buffer: *mut JsValueRef,
    parseAttributes: JsParseScriptAttributes
) -> JsErrorCode

Serializes a parsed script to a buffer than can be reused. JsSerializeScript parses a script and then stores the parsed form of the script in a runtime-independent format. The serialized script then can be deserialized in any runtime without requiring the script to be re-parsed. Requires an active script context. Script source can be either JavascriptString or JavascriptExternalArrayBuffer. In case it is an ExternalArrayBuffer, and the encoding of the buffer is Utf16, JsParseScriptAttributeArrayBufferIsUtf16Encoded is expected on parseAttributes. Use JavascriptExternalArrayBuffer with Utf8/ASCII script source for better performance and smaller memory footprint. The script to serialize ArrayBuffer Encoding for the script. The code JsNoError if the operation succeeded, a failure code otherwise.