Portals 0.7.0 · dev0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::DocumentExportSink Class Referenceabstract
Worker sink; storage/output policy belongs to the host implementation. write borrows bytes only for its call and must report a partial prefix even on error. Implementations must not retain the borrowed span or invoke UI code. A blocking sink retains its own cancellation latency; the exporter cannot forcibly interrupt it. Callers serialize an entire export per sink; concurrent write/finish is unsupported.
More...
Worker sink; storage/output policy belongs to the host implementation. write borrows bytes only for its call and must report a partial prefix even on error. Implementations must not retain the borrowed span or invoke UI code. A blocking sink retains its own cancellation latency; the exporter cannot forcibly interrupt it. Callers serialize an entire export per sink; concurrent write/finish is unsupported.
Cooperative cancellation; resource release must still complete.
Returns
Output finalization outcome; called exactly once after success, validation/source failure or cancellation. Cleanup must not create a new output. If an earlier failure exists, its cause is preserved and a secondary finalization failure is discarded; the result stores one cause.
Cooperative cancellation; account already accepted bytes before returning.
Returns
Exact accepted prefix and optional failure; zero without an error is invalid for nonempty input. An empty successful write begins a validated empty export without supplying payload.