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

One owning callback and its metadata; construct before checked set admission. Captures and metadata construction may throw before add/action/rebind is entered. More...

#include <ui_action.hpp>

Public Types

using Result
 Exact callback outcome.
using Callback = std::function<Result(const ActionInvocation &)>
 Owning compact callback adapter.

Public Member Functions

template<class CallbackType>
requires (std::copy_constructible<CallbackType> && portals::detail::ManagedAction<CallbackType, ActionInvocation>)
 Action (ActionMetadata metadata, CallbackType callback)

Public Attributes

ActionMetadata metadata
 Owning metadata admitted with the callback.
Callback callback
 Single owning callback; admitted invocations pin this object.

Detailed Description

One owning callback and its metadata; construct before checked set admission. Captures and metadata construction may throw before add/action/rebind is entered.

Member Typedef Documentation

◆ Result

Initial value:
std::variant<std::expected<void, TreeError>, std::expected<void, ManagedError>,
Owning checked editor command, preserving exactly its collector reporting receipt....
Definition editor_command.hpp:23

Exact callback outcome.

Constructor & Destructor Documentation

◆ Action()

template<class CallbackType>
requires (std::copy_constructible<CallbackType> && portals::detail::ManagedAction<CallbackType, ActionInvocation>)
portals::ui::Action::Action ( ActionMetadata metadata,
CallbackType callback )
inline
Parameters
metadataOwning common presentation.
callbackCompact owning callback, optionally accepting const ActionInvocation&.

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