| 109 | |
| 110 | template <typename T> |
| 111 | Result<T> GetOption(const std::string& key, const std::any& value) { |
| 112 | if (const auto* v = std::any_cast<T>(&value)) { |
| 113 | return *v; |
| 114 | } |
| 115 | return Status::Invalid("Filesystem option '", key, "' has the wrong type"); |
| 116 | } |
| 117 | |
| 118 | template <typename T> |
| 119 | Result<std::shared_ptr<const T>> GetConstSharedPtrOption(const std::string& key, |