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

Exclusive transport boundary, borrowed by FrameWriter for its lifetime. Implementations own submitted bytes, perform no I/O in submit, and preserve the exact unsent suffix on deadline/stop without an error. An accompanying error marks uncertain progress even on deadline/stop. All errors may have unknown effects. One executor calls all methods; no callbacks or concurrent calls are supported. A successful flush means bytes accepted, not hardware/display acknowledgement. More...

#include <diff.hpp>

Inheritance diagram for portals::FrameOutput:
portals::FrameOutputportals::FrameOutput portals::ApplicationTerminal portals::TerminalFrameOutput

Public Member Functions

virtual ~FrameOutput ()=default
 Destroy the adapter, without an implicit flush.
virtual std::expected< void, TerminalError > submit (std::string bytes)=0
 Take an owning batch, or reject without output; allocation may throw.
virtual TerminalWrite flush (TerminalDeadline deadline, std::stop_token stop)=0
 Flush the owned suffix; report bytes for this call and total pending.

Detailed Description

Exclusive transport boundary, borrowed by FrameWriter for its lifetime. Implementations own submitted bytes, perform no I/O in submit, and preserve the exact unsent suffix on deadline/stop without an error. An accompanying error marks uncertain progress even on deadline/stop. All errors may have unknown effects. One executor calls all methods; no callbacks or concurrent calls are supported. A successful flush means bytes accepted, not hardware/display acknowledgement.

Member Function Documentation

◆ flush()

virtual TerminalWrite portals::FrameOutput::flush ( TerminalDeadline deadline,
std::stop_token stop )
nodiscardpure virtual

Flush the owned suffix; report bytes for this call and total pending.

Parameters
deadlineAbsolute monotonic deadline for this call.
stopCooperative cancellation request; implementations preserve retryable suffixes when effects are known.
Returns
This call's completed byte count, remaining suffix, status and any uncertain-output error.

Implemented in portals::TerminalFrameOutput.

◆ submit()

virtual std::expected< void, TerminalError > portals::FrameOutput::submit ( std::string bytes)
nodiscardpure virtual

Take an owning batch, or reject without output; allocation may throw.

Parameters
bytesComplete encoded transaction, transferred to the transport on success.
Returns
Success when the batch is retained, or a transport rejection before output.

Implemented in portals::TerminalFrameOutput.


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