absl::StatusBuilder::AttachPayload

Attaches a MessageSet extension payload using the default extension ID.

Synopsis

Declared in <absl/status/status_builder.h>

template<typename MessageSetExtension>
[[nodiscard]]
decltype(std::move(AttachPayload(obj)))
AttachPayload(MessageSetExtension const& obj) &&;

Description

As above, but &&-qualified. Uses decltype() to propagate template constraints (SFINAE).

Return Value

*this to allow method chaining.

NOTE

The return value should not be discarded.

Parameters

NameDescription
objThe extension message to attach.