|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The serialisation primitive encode calls, as an injectable strategy. More...
#include <wire.hpp>
Public Attributes | |
| std::function< glz::error_ctx(const Envelope &env, std::string &out)> | writeEnvelope |
Serialises env into out. Mirrors the glz::write call encode would otherwise make directly. | |
The serialisation primitive encode calls, as an injectable strategy.
Same shape and rationale as morph::core::FileIoOps: the member defaults to the real call it stands in for, so a default-constructed WireCodecOps is byte-for-byte what encode did before this seam existed.
That leaves a branch guarding a real invariant with no way to reach it. Rather than reshape Envelope to make a test possible, or wait on a fault-injection hook glaze does not offer, this puts the seam on morph's side of the boundary — where the repository already puts it for the identical problem with file I/O.
| std::function<glz::error_ctx(const Envelope& env, std::string& out)> morph::wire::WireCodecOps::writeEnvelope |
Serialises env into out. Mirrors the glz::write call encode would otherwise make directly.