code: func (r *ClientExtractorResult) ToObjectRef() (*api.ObjectRef, error) {
  	algo := api.HashAlgo_value[r.ClientBinary.HashAlgo]
  	if algo == 0 {
  		// Note: this means OLD version of the server may not be able to serve
  		// NEW ClientExtractorResult entries due to unknown hash algo. Many other
  		// things will also break in this situation. If this is really happening,
  		// all new entries can be manually removed from the datastore, to stop
  		// confusing the old server version.
  		return nil, fmt.Errorf("unrecognized hash algo %q", r.ClientBinary.HashAlgo)
  	}
  	ref := &api.ObjectRef{
  		HashAlgo:  api.HashAlgo(algo),
  		HexDigest: r.ClientBinary.HashDigest,
  	}
  	if err := common.ValidateObjectRef(ref, common.KnownHash); err != nil {
  		return nil, err
  	}
  	return ref, nil
  }
docs: // ToObjectRef returns a reference to the extracted client binary in CAS.
  //
  // The returned ObjectRef is validated to be syntactically correct already.