absl::StatusBuilder::SetPayload

Adds a payload for the status that will be returned by this StatusBuilder.

Synopses

Declared in <absl/status/status_builder.h>

Adds a payload for the status that will be returned by this StatusBuilder.

[[nodiscard]]
StatusBuilder&&
SetPayload(
    std::string_view type_url,
    absl::Cord payload) &&;
» more...

Adds a payload for the status that will be returned by this StatusBuilder.

StatusBuilder&
SetPayload(
    std::string_view type_url,
    absl::Cord payload) &;
» more...

Return Value

*this to allow method chaining.

Parameters

NameDescription
type_urlThe type URL identifying the payload.
payloadThe payload data to attach.