Immutable owning checkpoint; copies share bytes and never retain providers or UI objects. A default value is empty/invalid and allocates nothing. Capture/load stage a new value; failures never replace a caller's existing checkpoint or navigation state. Envelope checksum detects accidental corruption, not malicious modification or authenticity. Parse validates structure only; restore requires a matching provider and does not apply positions to views, grant write permissions, or resolve a position against live data.
More...
#include <navigation_checkpoint.hpp>
|
|
static constexpr std::uint32_t | FORMAT_VERSION = 1 |
| | Binary envelope schema, independent of provider version.
|
Immutable owning checkpoint; copies share bytes and never retain providers or UI objects. A default value is empty/invalid and allocates nothing. Capture/load stage a new value; failures never replace a caller's existing checkpoint or navigation state. Envelope checksum detects accidental corruption, not malicious modification or authenticity. Parse validates structure only; restore requires a matching provider and does not apply positions to views, grant write permissions, or resolve a position against live data.
◆ bytes()
| std::span< const std::byte > portals::NavigationCheckpoint::bytes |
( |
| ) |
const |
|
noexcept |
- Returns
- Immutable encoded bytes, valid while this value or a copy survives.
◆ capture()
- Parameters
-
| entries | Bounded metadata-only locations in the provider's single resource domain. |
| codec | Explicit portable identity/position conversion. |
| options | Maximum encoded and restored metadata. |
| stop | Cooperative cancellation, checked before and after callbacks. |
- Returns
- New immutable envelope or a typed validation/provider/allocation failure.
◆ parse()
- Parameters
-
| bytes | Untrusted encoded envelope, copied only after a full bounded preflight. |
| options | Envelope/entry/identity capacities. |
| stop | Cooperative cancellation. |
- Returns
- Owning structurally validated checkpoint or typed rejection.
◆ restore()
- Parameters
-
| codec | Matching portable resource and codec; decoded bookmarks are revalidated. |
| options | Envelope and decoded bookmark limits. |
| stop | Cooperative cancellation. |
- Returns
- Complete staged positions, without changing any navigation channel or view.
The documentation for this class was generated from the following file: