code: func (c *DirConstraint) hasMatchingChild(ctx context.Context, s *search, children map[blob.Ref]struct{},
  	matcher func(context.Context, *search, blob.Ref, camtypes.BlobMeta) (bool, error)) (bool, error) {
  	// TODO(mpl): See if we're guaranteed to be CPU-bound (i.e. all resources are in
  	// corpus), and if not, add some concurrency to spread costly index lookups.
  	for child, _ := range children {
  		meta, err := s.blobMeta(ctx, child)
  		if err != nil {
  			if os.IsNotExist(err) {
  				continue
  			}
  			return false, err
  		}
  		ok, err := matcher(ctx, s, child, meta)
  		if err != nil {
  			return false, err
  		}
  		if ok {
  			return true, nil
  		}
  	}
  	return false, nil
  }
docs: // hasMatchingChild runs matcher against each child and returns true as soon as
  // there is a match, of false if none of them is a match.