Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ui::EditTextCodec< Value > Struct Template Reference

Owning scalar conversion used by the existing current-record text editor. More...

#include <ui_model_edit.hpp>

Public Member Functions

 ~EditTextCodec ()=default
 Keep owning callback transfers fallible before the checked mount boundary.

Public Attributes

std::function< std::expected< std::string, TreeError >(const Value &)> format
 Complete owning editor text.
std::function< std::expected< Value, TreeError >(std::string_view)> parse
 Complete typed candidate, or an error.

Detailed Description

template<class Value>
struct portals::ui::EditTextCodec< Value >

Owning scalar conversion used by the existing current-record text editor.

Template Parameters
ValueOwning copyable field value. Callbacks run synchronously on the UI thread, must be short and non-reentrant, and must not retain the borrowed candidate/value. Formatting may allocate; parsing rejects the complete candidate with INVALID_ARGUMENT. Other errors retain their typed diagnostic. This is a scalar adapter, not a windowed text source.

The documentation for this struct was generated from the following file: