Verified Commit 4e9d7ed8 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Add formatting function for admire::node

parent 7f248631
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -442,6 +442,17 @@ struct fmt::formatter<admire::dataset> : formatter<std::string_view> {
    }
};

template <>
struct fmt::formatter<admire::node> : formatter<std::string_view> {
    // parse is inherited from formatter<string_view>.
    template <typename FormatContext>
    auto
    format(const admire::node& n, FormatContext& ctx) const {
        const auto str = fmt::format("hostname: {}", std::quoted(n.hostname()));
        return formatter<std::string_view>::format(str, ctx);
    }
};

template <>
struct fmt::formatter<enum admire::storage::type>
    : formatter<std::string_view> {