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

Optional synchronous storage seam; no filesystem or scheduler is installed implicitly. Caller owns and serializes this adapter. Invoke load/save on an existing worker when the adapter can block; these functions do not dispatch work or enforce UI affinity. Read/write failures may affect external storage, but cannot alter memory checkpoints or navigation state. Atomic replacement/durability is the adapter's explicit contract. More...

#include <navigation_checkpoint.hpp>

Public Member Functions

virtual std::expected< std::size_t, NavigationCheckpointError > read (std::span< std::byte > output, std::stop_token stop={})=0
virtual std::expected< void, NavigationCheckpointError > write (std::span< const std::byte > bytes, std::stop_token stop={})=0

Detailed Description

Optional synchronous storage seam; no filesystem or scheduler is installed implicitly. Caller owns and serializes this adapter. Invoke load/save on an existing worker when the adapter can block; these functions do not dispatch work or enforce UI affinity. Read/write failures may affect external storage, but cannot alter memory checkpoints or navigation state. Atomic replacement/durability is the adapter's explicit contract.

Member Function Documentation

◆ read()

virtual std::expected< std::size_t, NavigationCheckpointError > portals::NavigationCheckpointStorage::read ( std::span< std::byte > output,
std::stop_token stop = {} )
pure virtual
Parameters
outputMaximum allowed envelope bytes.
stopCooperative cancellation.
Returns
Actual bytes read, or typed failure; overflow is rejected by the caller.

◆ write()

virtual std::expected< void, NavigationCheckpointError > portals::NavigationCheckpointStorage::write ( std::span< const std::byte > bytes,
std::stop_token stop = {} )
pure virtual
Parameters
bytesImmutable complete envelope.
stopCooperative cancellation.
Returns
Successful write or typed storage/cancellation failure.

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