Class KeyValueIterable¶
Defined in File key_value_iterable.h
Class Documentation¶
-
class
opentelemetry::common
::
KeyValueIterable
¶ Supports internal iteration over a collection of key-value pairs.
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