Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ui::TextResult Class Reference

Owning read-only concatenation, including the original typed failure when reading fails. Successful results validate complete joined graphemes under the leftmost property/result policy and default TextLimits. Sources, selections, drafts and invalidation are never changed. Assignment revalidates under the receiving widget's policy and limits. No locale is inferred; a resource operand uses the leftmost proxy's explicitly captured resolver. Copying successful text or captured failures can allocate and throw before a receiving call starts. More...

#include <ui_ref.hpp>

Public Member Functions

std::expected< GraphemeText, ManagedError > result () const
TextResult operator+ (const TextProperty &value) const
TextResult operator+ (std::string_view value) const
TextResult operator+ (const TextValue &value) const
TextResult operator+ (const TextResult &value) const

Friends

class TextProperty
struct detail::RefAccess

Detailed Description

Owning read-only concatenation, including the original typed failure when reading fails. Successful results validate complete joined graphemes under the leftmost property/result policy and default TextLimits. Sources, selections, drafts and invalidation are never changed. Assignment revalidates under the receiving widget's policy and limits. No locale is inferred; a resource operand uses the leftmost proxy's explicitly captured resolver. Copying successful text or captured failures can allocate and throw before a receiving call starts.

Member Function Documentation

◆ operator+() [1/4]

TextResult portals::ui::TextResult::operator+ ( const TextProperty & value) const
Parameters
valueProperty read synchronously on its UI thread without mutation.
Returns
Owning concatenation, or the first unchanged typed failure.

◆ operator+() [2/4]

TextResult portals::ui::TextResult::operator+ ( const TextResult & value) const
Parameters
valueAnother owning concatenation, borrowed only for this call.
Returns
Owning concatenation under this result's policy, or the first typed failure.

◆ operator+() [3/4]

TextResult portals::ui::TextResult::operator+ ( const TextValue & value) const
Parameters
valueOwning expression; resource operands use the explicitly captured resolver.
Returns
Owning concatenation or original typed failure, without reporting to a scene.

◆ operator+() [4/4]

TextResult portals::ui::TextResult::operator+ ( std::string_view value) const
Parameters
valueLiteral suffix borrowed only for this call.
Returns
Owning concatenation with complete boundary resegmentation, or typed failure.

◆ result()

std::expected< GraphemeText, ManagedError > portals::ui::TextResult::result ( ) const
Returns
Owning validated text copy or original read/resolve/concatenation failure. Copying successful text may throw std::bad_alloc; the stored result remains unchanged.

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