| 317 | } |
| 318 | |
| 319 | Result<Id> ExtensionSet::DecodeFunction(uint32_t anchor) const { |
| 320 | if (functions_.find(anchor) == functions_.end() || functions_.at(anchor).empty()) { |
| 321 | return Status::Invalid("User defined function reference ", anchor, |
| 322 | " did not have a corresponding anchor in the extension set"); |
| 323 | } |
| 324 | return functions_.at(anchor); |
| 325 | } |
| 326 | |
| 327 | Result<uint32_t> ExtensionSet::EncodeFunction(Id function_id) { |
| 328 | RETURN_NOT_OK(this->AddUri(function_id)); |