Class KeyValueIterable
Defined in File key_value_iterable.h
Inheritance Relationships
Derived Type
public opentelemetry::common::NoopKeyValueIterable
(Class NoopKeyValueIterable)
Class Documentation
-
class KeyValueIterable
Supports internal iteration over a collection of key-value pairs.
Subclassed by opentelemetry::common::NoopKeyValueIterable
Public Functions
-
virtual ~KeyValueIterable() = default
-
virtual bool ForEachKeyValue(nostd::function_ref<bool(nostd::string_view, common::AttributeValue)> callback) const noexcept = 0
Iterate over key-value pairs
- Parameters:
callback – a callback to invoke for each key-value. If the callback returns false, the iteration is aborted.
- Returns:
true if every key-value pair was iterated over
-
virtual size_t size() const noexcept = 0
- Returns:
the number of key-value pairs
-
virtual ~KeyValueIterable() = default