One transformation in a Pipeline. More...
#include <StormByte/buffer/pipe.hxx>
Public Types | |
| using | Callback |
| Owned callback with borrowed stream endpoints and logger. | |
Public Member Functions | |
| Pipe (Callback callback) noexcept | |
| Adopt an explicitly provided creator-context callback. | |
| template<typename Callable> requires (!Type::SameAs<std::remove_cvref_t<Callable>, Pipe>) && Type::CopyConstructible<std::remove_cvref_t<Callable>> && requires(std::remove_cvref_t<Callable>& callable, const PipeInput& input, const PipeOutput& output, const StormByte::Safe::Shared<StormByte::Logger::Log>& log) { { callable(input, output, log) } -> Type::SameAs<void>; } | |
| STORMBYTE_FORCE_INLINE | Pipe (Callable &&callable) |
| Own a copyable callable in its creator module. | |
| Pipe (const Pipe &other) | |
| Copy a Pipe. | |
| Pipe (Pipe &&other) noexcept | |
| Take a Pipe. | |
| ~Pipe () noexcept | |
| Release context through its creator callback. | |
| Pipe & | operator= (const Pipe &other) |
| Copy-assign a Pipe. | |
| Pipe & | operator= (Pipe &&other) noexcept |
| Move-assign a Pipe. | |
| StormByte::Safe::Status | Run (const PipeInput &in, const PipeOutput &out, const StormByte::Safe::Shared< StormByte::Logger::Log > &log) const |
| Run this pipe. | |
One transformation in a Pipeline.
Owns a copyable creator-context callback, not a polymorphic stage. Copies clone the callable and its value captures independently. References and shared handles inside captures retain their normal sharing semantics. Endpoint facades and the logger reference are synchronous borrows only. Close or fail the output before returning. The callable provider, Buffer, Base and Logger must remain loaded with a compatible ABI until release.
Owned callback with borrowed stream endpoints and logger.
|
explicitnoexcept |
Adopt an explicitly provided creator-context callback.
| callback | Callback whose provider supplies independent clone and release operations. |
|
inlineexplicit |
Own a copyable callable in its creator module.
| Callable | Copyable stage callable type. |
| callable | Invoked with input, output and a borrowed scoped logger. |
| StormByte::Exception | Context allocation or construction failed. |
| StormByte::Buffer::Pipe::Pipe | ( | const Pipe & | other | ) |
|
noexcept |
|
noexcept |
Release context through its creator callback.
| StormByte::Safe::Status StormByte::Buffer::Pipe::Run | ( | const PipeInput & | in, |
| const PipeOutput & | out, | ||
| const StormByte::Safe::Shared< StormByte::Logger::Log > & | log ) const |
Run this pipe.
| in | Source. Lives for the call. |
| out | Sink. Lives for the call. Close or SetError before return. |
| log | Shared handle. Empty if the caller passed none. Already scoped Buffer/Pipeline when set. |
| StormByte::Exception | Safe exceptions from the callback. |