| 292 | } |
| 293 | |
| 294 | Result<ExtensionSet::TypeRecord> ExtensionSet::DecodeType(uint32_t anchor) const { |
| 295 | if (types_.find(anchor) == types_.end() || types_.at(anchor).id.empty()) { |
| 296 | return Status::Invalid("User defined type reference ", anchor, |
| 297 | " did not have a corresponding anchor in the extension set"); |
| 298 | } |
| 299 | return types_.at(anchor); |
| 300 | } |
| 301 | |
| 302 | Result<uint32_t> ExtensionSet::EncodeType(const DataType& type) { |
| 303 | if (auto rec = registry_->GetType(type)) { |
no test coverage detected