| 91 | } |
| 92 | |
| 93 | Result<std::string> KeyValueMetadata::Get(std::string_view key) const { |
| 94 | auto index = FindKey(key); |
| 95 | if (index < 0) { |
| 96 | return Status::KeyError(key); |
| 97 | } else { |
| 98 | return value(index); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | Status KeyValueMetadata::Delete(int64_t index) { |
| 103 | keys_.erase(keys_.begin() + index); |