Iterates over the stored payloads and calls the visitor(type_key, payload) callable for each one.

Synopsis

Declared in <absl/status/status.h>

void
ForEachPayload(absl::FunctionRef<void(std::string_view, xref:absl/Cord.adoc[absl::Cord const&)>] visitor) const;

Description

NOTE: The order of calls to visitor() is not specified and may change at any time.

NOTE: Any mutation on the same 'absl::Status' object during visitation is forbidden and could result in undefined behavior.

Parameters

Name

Description

visitor

The callable invoked for each stored payload.

Created with MrDocs