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

Method HasFieldByName

common/values/parsed_message_value.cc:226–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226absl::StatusOr<bool> ParsedMessageValue::HasFieldByName(
227 absl::string_view name) const {
228 const auto* descriptor = GetDescriptor();
229 const auto* field = descriptor->FindFieldByName(name);
230 if (field == nullptr) {
231 field = descriptor->file()->pool()->FindExtensionByPrintableName(descriptor,
232 name);
233 if (field == nullptr) {
234 return NoSuchFieldError(name).NativeValue();
235 }
236 }
237 return HasField(field);
238}
239
240absl::StatusOr<bool> ParsedMessageValue::HasFieldByNumber(
241 int64_t number) const {

Callers

nothing calls this directly

Calls 4

GetDescriptorFunction · 0.85
NoSuchFieldErrorFunction · 0.85
FindFieldByNameMethod · 0.45
NativeValueMethod · 0.45

Tested by

no test coverage detected