Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::PageBuilder< T > Class Template Reference

One reserved worker-only builder. Never expose its writable resource after publication. More...

#include <window_source.hpp>

Public Member Functions

std::pmr::memory_resource * resource () noexcept
std::pmr::memory_resource * workspace () noexcept
template<class... Args>
std::expected< void, SourceError > emplace (RowId id, std::uint64_t revision, Args &&...args)
std::expected< SourceReadReply< T >, SourceError > ready (SourceCursor before, SourceCursor after, SourceEdge edge)

Friends

template<class>
class WindowRequest

Detailed Description

template<class T>
class portals::PageBuilder< T >

One reserved worker-only builder. Never expose its writable resource after publication.

Template Parameters
TNothrow-destructible row; construct dynamic payload using resource(), not an external allocator.

Member Function Documentation

◆ emplace()

template<class T>
template<class... Args>
std::expected< void, SourceError > portals::PageBuilder< T >::emplace ( RowId id,
std::uint64_t revision,
Args &&... args )
inline
Template Parameters
ArgsConstructor arguments for T; dynamic storage must use resource().
Parameters
idPositive stable row identity.
revisionPositive row value revision.
argsArguments forwarded directly to the in-place value constructor.
Returns
Success or a typed row/page/allocation failure; no row is appended on failure.

◆ ready()

template<class T>
std::expected< SourceReadReply< T >, SourceError > portals::PageBuilder< T >::ready ( SourceCursor before,
SourceCursor after,
SourceEdge edge )
inline
Parameters
beforeResolved gap before the returned rows.
afterResolved gap after the returned rows.
edgeExplicit continuation/end state in the command direction.
Returns
Immutable owning page, or INVALID_REPLY on repeated seal/foreign stamp.

◆ resource()

template<class T>
std::pmr::memory_resource * portals::PageBuilder< T >::resource ( )
inlinenoexcept
Returns
Reserved monotonic page resource; no upstream fallback or UI use.

◆ workspace()

template<class T>
std::pmr::memory_resource * portals::PageBuilder< T >::workspace ( )
inlinenoexcept
Returns
Separately reserved temporary worker memory; no borrow may escape load.

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