Files
scylladb/streaming/stream_session_state.hh
Kefu Chai 618091f6f7 streaming: add fmt::formatter for stream_session_state
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for
`streaming::stream_session_state`, and drop its operator<<

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-02-22 14:03:59 +08:00

31 lines
563 B
C++

/*
*
* Modified by ScyllaDB
* Copyright (C) 2015-present ScyllaDB
*/
/*
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/
#pragma once
#include <fmt/core.h>
namespace streaming {
enum class stream_session_state {
INITIALIZED,
PREPARING,
STREAMING,
WAIT_COMPLETE,
COMPLETE,
FAILED,
};
} // namespace
template <> struct fmt::formatter<streaming::stream_session_state> : fmt::formatter<std::string_view> {
auto format(streaming::stream_session_state, fmt::format_context& ctx) const -> decltype(ctx.out());
};