We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9be4a5d commit c3876e6Copy full SHA for c3876e6
src/v/kafka/protocol/metadata.h
@@ -69,11 +69,21 @@ struct metadata_response {
69
void decode(iobuf buf, api_version version) {
70
data.decode(std::move(buf), version);
71
}
72
-
73
- friend std::ostream&
74
- operator<<(std::ostream& os, const metadata_response& r) {
75
- return os << r.data;
76
- }
77
};
78
79
} // namespace kafka
+
+template<>
+struct fmt::formatter<kafka::metadata_response> {
+ template<typename ParseContext>
+ constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
80
+ return ctx.begin();
81
+ }
82
83
+ template<typename FormatContext>
84
+ auto format(
85
+ [[maybe_unused]] const kafka::metadata_response& v,
86
+ FormatContext& ctx) const -> decltype(ctx.out()) {
87
+ return fmt::format_to(ctx.out(), "{}", v.data);
88
89
+};
0 commit comments