Function yrs::ydoc_clone

source ·
#[no_mangle]
pub unsafe extern "C" fn ydoc_clone(doc: *mut Doc) -> *mut Doc
Expand description

Creates a shallow clone of a provided doc - it’s realized by increasing the ref-count value of the document. In result both input and output documents point to the same instance.

Documents created this way can be destroyed via ydoc_destroy - keep in mind, that the memory will still be persisted until all strong references are dropped.