|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Adapter retaining existing immutable shared text without copying whole input. More...
#include <document_source.hpp>
Public Member Functions | |
| MemoryDocumentProvider (std::shared_ptr< const std::string > text, std::uint64_t revision=1) | |
| ByteDocumentCapabilities | capabilities () const noexcept override |
| std::expected< ByteDocumentMetadata, DocumentError > | metadata (std::stop_token stop) override |
| std::expected< ByteReadResult, DocumentError > | read (const ByteReadCommand &command, std::span< std::byte > destination, std::stop_token stop) override |
| Public Member Functions inherited from portals::ByteDocumentProvider | |
| virtual | ~ByteDocumentProvider ()=default |
| Safe final destruction after worker release. | |
| virtual std::size_t | pinnedBudgetBytes (const SourceBudget &root) const noexcept |
| virtual bool | tryReleaseOptionalStorage () noexcept |
| virtual std::expected< ByteDocumentMetadata, DocumentError > | discoverExtent (std::stop_token stop) |
| virtual std::expected< std::unique_ptr< ByteDocumentReadSession >, DocumentError > | openReadSession (std::stop_token stop) |
Adapter retaining existing immutable shared text without copying whole input.
|
explicit |
| text | Existing immutable shared storage; null is rejected on use. |
| revision | Nonzero exact revision, default1. |
|
overridevirtualnoexcept |
Implements portals::ByteDocumentProvider.
|
overridevirtual |
| stop | Cooperative cancellation. |
Implements portals::ByteDocumentProvider.
|
overridevirtual |
| command | Exact revision and byte offset. |
| destination | Borrowed writable bytes. |
| stop | Cooperative cancellation. |
Implements portals::ByteDocumentProvider.