Skip to main content

shared_objects

Function shared_objects 

Source
pub fn shared_objects(doc: &EditDoc<'_>) -> ShareCounts
Expand description

The object numbers more than one object in doc points at.

A shared object cannot be edited in place, so this is what decides between rewriting an element and copying it. The sweep walks the reachable graph once, counting references; anything reached twice is shared.