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

Method Has

eval/public/structs/cel_proto_wrap_util.cc:128–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126 key_list_(values) {}
127
128 absl::StatusOr<bool> Has(const CelValue& key) const override {
129 CelValue::StringHolder str_key;
130 if (!key.GetValue(&str_key)) {
131 // Not a string key.
132 return absl::InvalidArgumentError(absl::StrCat(
133 "Invalid map key type: '", CelValue::TypeName(key.type()), "'"));
134 }
135
136 return values_->fields().contains(std::string(str_key.value()));
137 }
138
139 absl::optional<CelValue> operator[](CelValue key) const override;
140

Callers 2

TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 3

typeMethod · 0.80
GetValueMethod · 0.45
valueMethod · 0.45

Tested by 2

TEST_FFunction · 0.36
TEST_FFunction · 0.36