25#include <seastar/core/future.hh>
26#include <seastar/core/iostream.hh>
27#include <seastar/util/modules.hh>
31SEASTAR_MODULE_EXPORT_BEGIN
41requires std::is_invocable_r_v<future<>, W, output_stream<char>&>
42future<> write_to_stream_and_close(output_stream<char>&& out_, W writer) {
43 output_stream<char> out = std::move(out_);
44 std::exception_ptr ex;
49 ex = std::current_exception();
53 co_await coroutine::return_exception_ptr(std::move(ex));
57SEASTAR_MODULE_EXPORT_END
Seastar API namespace.
Definition: abort_on_ebadf.hh:26