code: func (s *Store) Snapshot() *Store {
  	if s.IsReadOnly() {
  		return s
  	}
  
  	s.collLock.RLock()
  	defer s.collLock.RUnlock()
  
  	// Return a read-only Store with the new Collection set.
  	snap := &Store{
  		collLock:  nil,
  		colls:     make(map[string]*Collection, len(s.colls)),
  		collNames: s.collNames,
  	}
  
  	// Create a read-only Collection for each coll.
  	for k, coll := range s.colls {
  		newColl := &Collection{
  			name: coll.name,
  		}
  		newColl.setRoot(coll.currentRoot())
  		snap.colls[k] = newColl
  	}
  	return snap
  }
docs: // Snapshot creates a read-only copy of the Store and all of its Collection
  // instances. Because a Store is copy-on-write, this is a cheap operation.