|
YOrch 1.0.0
|
Output sink passed to direct-output tasks. More...
#include <direct_out.hpp>
Public Member Functions | |
| constexpr | direct_out (detail::typed_slot< T, detail::slot_logical_policy::maybe_payload > &slot) noexcept |
| constexpr | direct_out (detail::slot_view< T > slot) noexcept |
| Binds the sink to an already-created typed slot view. | |
| template<typename... Args> | |
| constexpr T & | emplace (Args &&... args) noexcept(noexcept(slot_.emplace(std::forward< Args >(args)...))) |
| template<typename... Args> | |
| constexpr step_result | success (Args &&... args) noexcept(noexcept(emplace(std::forward< Args >(args)...))) |
| constexpr void | destroy () noexcept |
| constexpr bool | has_value () const noexcept |
Output sink passed to direct-output tasks.
direct_out<T> models maybe-payload semantics: receiving the sink does not guarantee that the task will call emplace(...) before returning. The sink always materializes an owned payload in the destination slot; it does not model alias/reference output semantics. This is why it only accepts maybe-capable storage and stores a slot_view<T> instead of a plain slot reference; the same public sink can target a typed one-to-one slot or an erased compact-layout slot.
If a task needs to mutate a direct-parent payload and then forward that same object into its own output slot, prefer consume_prev<T>() plus out.success(std::move(value)) so the ownership transfer stays explicit.
Definition at line 28 of file direct_out.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 34 of file direct_out.hpp.
|
inlineexplicitconstexprnoexcept |
Binds the sink to an already-created typed slot view.
Definition at line 41 of file direct_out.hpp.
|
inlineconstexprnoexcept |
Definition at line 57 of file direct_out.hpp.
|
inlineconstexprnoexcept |
Definition at line 45 of file direct_out.hpp.
|
inlineconstexprnoexcept |
Definition at line 61 of file direct_out.hpp.
|
inlineconstexprnoexcept |
Definition at line 51 of file direct_out.hpp.