Skip to main content

structured_clone

Function structured_clone 

Source
pub fn structured_clone(
    value: JsValue,
    options: Option<StructuredCloneOptions>,
    context: &mut Context,
) -> Result<JsValue, JsError>
Expand description

The structuredClone() method of the Window interface creates a deep clone of a given value using the structured clone algorithm.

ยงErrors

Will return an error if the context cannot create objects or copy bytes, or if any unhandled case by the structured clone algorithm.