63 const std::type_info&
type()
const
65 return std::visit([](
auto& t) {
return std::ref(
typeid(t)); }, tool_m);
69 const char*
who()
const {
return tool_m.index() == 0 ?
"Context" :
"Socket"; }
74 return std::visit([](
const auto& t) {
return t.id(); }, tool_m);
78 auto format_to(std::format_context& ctx)
const ->
decltype(ctx.out())
80 return std::format_to(ctx.out(),
"{} #{}",
who(),
id());
85 const std::variant<nngxx::ctx_view, nngxx::socket_view> tool_m;
clev::iface< nng_ctx > ctx_view
clev::iface< nng_socket > socket_view