Owning validated switch decorations, independent of any widget or scene.
More...
#include <controls.hpp>
|
| static std::expected< SwitchChrome, TreeError > | from (std::string_view off, std::string_view on, WidthPolicy policy={}) |
| | Validate same-width single-line off/on decorations under the receiving policy.
|
Owning validated switch decorations, independent of any widget or scene.
◆ from()
| std::expected< SwitchChrome, TreeError > portals::SwitchChrome::from |
( |
std::string_view | off, |
|
|
std::string_view | on, |
|
|
WidthPolicy | policy = {} ) |
|
static |
Validate same-width single-line off/on decorations under the receiving policy.
- Parameters
-
| off | Off bytes copied during this call. |
| on | On bytes copied during this call. |
| policy | Complete receiving width policy. |
- Returns
- Owning pair or INVALID_ARGUMENT; allocation before/inside construction may throw.
◆ policy()
- Returns
- Complete receiving policy.
The documentation for this class was generated from the following file: