pub fn shared_objects(doc: &EditDoc<'_>) -> ShareCountsExpand 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.