39template<
typename Func>
45 lazy_eval(Func&& f) : _func(std::forward<Func>(f)) {}
76template <
typename Func>
130template <
typename Func>
135template <
typename Func>
140template <
typename Func>
155template <
typename Func>
156struct fmt::formatter<
seastar::lazy_eval<Func>> : fmt::formatter<string_view> {
157 template <
typename FormatContext>
159 return fmt::format_to(ctx.out(),
"{}", lf());
164struct fmt::formatter<
seastar::lazy_deref_wrapper<T>> : fmt::formatter<string_view> {
165 template <
typename FormatContext>
168 return fmt::format_to(ctx.out(),
"{}", *ld.p);
170 return fmt::format_to(ctx.out(),
"null");
This class is a wrapper for a lazy evaluation of a value.
Definition: lazy.hh:40
auto operator()() const
Evaluate a value (const version).
Definition: lazy.hh:58
auto operator()()
Evaluate a value.
Definition: lazy.hh:51
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
lazy_eval< Func > value_of(Func &&func)
Definition: lazy.hh:77
lazy_deref_wrapper< T > lazy_deref(const T &p)
Definition: lazy.hh:108
ostream & operator<<(ostream &os, const seastar::lazy_eval< Func > &lf)
Definition: lazy.hh:131
This struct is a wrapper for lazy dereferencing a pointer.
Definition: lazy.hh:90