Construct a writable empty stream or an immutable snapshot of a view.
initialOptionalInitial capacity or read-only bytes; defaults to 256.
Invoke Rml::Stream::Close; memory bytes remain available until shutdown.
Erase bytes and clamp the existing cursor to the new length.
offsetStart in [0, length].
countMaximum bytes to remove.
Return Rml::Stream::GetSourceURL as text.
Source URL used for relative resources.
Return Rml::Stream::GetStreamMode; new memory streams start at zero.
Native mode bit mask.
Invoke Rml::Stream::IsEOS.
Whether the cursor is at the end.
Invoke Rml::Stream::IsReadReady.
Whether bytes are ready to read.
Check readiness; immutable memory snapshots and files always return false.
Whether bytes can be written now.
Return Rml::Stream::Length in bytes.
Total byte length.
Read through Rml::Stream::Peek without advancing the cursor.
targetMaximum byte count.
Independent bytes without consuming the source.
Peek into a view without advancing the cursor.
targetDestination byte view.
countOptionalByte limit; defaults to view size.
Bytes copied without consuming the source.
Invoke safe Rml::Stream::PopBack with a length-clamped count.
countMaximum bytes to remove.
Actual bytes removed.
Remove front bytes; oversized counts clamp to the stream length.
countMaximum bytes to remove.
Actual bytes removed; memory cursors move back and clamp at zero.
Invoke Rml::Stream::PushBack and restore the previous cursor.
inputUTF-8 text or bytes to append.
Number of bytes appended.
Invoke Rml::Stream::PushFront; memory cursors advance with the insertion.
inputUTF-8 text or bytes to prepend.
Number of bytes prepended.
Copy Rml::StreamMemory::RawStream into independent storage.
All used bytes; unaffected by reallocations or shutdown.
Read into a view or stream through Rml::Stream::Read.
targetDestination view or stream.
countOptionalByte limit; defaults to view size or remaining length.
Source bytes consumed, even on short destination writes.
Decode consumed UTF-8 bytes and append them to an initial string.
countMaximum byte count.
initialInitial string; defaults to empty.
Appended string, preserving embedded null characters.
Invoke Rml::Stream::Seek with a checked signed integer offset.
offsetByte offset; StreamMemory End subtracts this value.
originSeek base; defaults to Set.
Native success flag; invalid memory targets leave the cursor.
Set Rml::StreamMemory::SetSourceURL and its native Read/Write mode.
sourceUrlRelative resource origin; embedded nulls are rejected.
Return Rml::Stream::Tell in bytes.
Current byte position.
Invoke Rml::Stream::Truncate; memory cursors move to the new end.
lengthRequested byte length; larger memory lengths do nothing.
Number of bytes removed.
Invoke Rml::Stream::Write using UTF-8, bytes or another stream.
inputSource; strings preserve embedded null characters.
countOptionalOptional byte limit; defaults to input or remaining size.
Bytes written, or source bytes consumed when copying a stream.
Invoke the native C-string write semantics, stopping at the first null.
inputUTF-8 text.
Bytes written before the first null.
Rml::StreamMemory backed by native-owned bytes.