8#include <unordered_map>
45struct formatter<
ccf::ProposalState>
47 template <
typename ParseContext>
48 constexpr auto parse(ParseContext& ctx)
53 template <
typename FormatContext>
55 ->
decltype(ctx.out())
61 return format_to(ctx.out(),
"open");
65 return format_to(ctx.out(),
"accepted");
69 return format_to(ctx.out(),
"withdrawn");
73 return format_to(ctx.out(),
"rejected");
77 return format_to(ctx.out(),
"failed");
81 return format_to(ctx.out(),
"dropped");
85 throw std::logic_error(fmt::format(
86 "Unknown proposal state {}",
static_cast<uint8_t
>(state)));
#define DECLARE_JSON_ENUM(TYPE,...)
Definition json.h:864
Definition app_interface.h:13
ProposalState
Definition proposals.h:19
std::string ProposalId
Definition proposals.h:40