MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Has

Method Has

tools/flatbuffers_backed_impl.cc:93–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 int size() const override { return list_ ? list_->size() : 0; }
92
93 absl::StatusOr<bool> Has(const CelValue& key) const override {
94 auto lookup_result = (*this)[key];
95 if (!lookup_result.has_value()) {
96 return false;
97 }
98 auto result = *lookup_result;
99 if (result.IsError()) {
100 return *(result.ErrorOrDie());
101 }
102 return true;
103 }
104
105 absl::optional<CelValue> operator[](CelValue cel_key) const override {
106 if (!cel_key.IsString()) {

Callers

nothing calls this directly

Calls 3

ErrorOrDieMethod · 0.80
has_valueMethod · 0.45
IsErrorMethod · 0.45

Tested by

no test coverage detected