StreamReadError
Owns proven consumed bytes when whole-stream collection fails. Bytes includes valid partial provider progress before failure. Reason's count equals Bytes.Length; bytes are not silently refunded to the source. Source remains caller-owned. This record adds no synchronization or decoding.
Module std.io
import std.io;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
StreamReadError
pub final class StreamReadErrorOwns proven consumed bytes when whole-stream collection fails. Bytes includes valid partial provider progress before failure. Reason's count equals Bytes.Length; bytes are not silently refunded to the source. Source remains caller-owned. This record adds no synchronization or decoding.
pub Reason: IoError;
pub Reason: IoError;Portable failure whose count equals the retained byte prefix.
pub Bytes: Vector<byte>;
pub Bytes: Vector<byte>;Sole owner of the consumed prefix, available for inspection/recovery.
pub CleanupError: IoError?;
pub CleanupError: IoError?;Secondary close failure after a primary read failure, otherwise none.
pub init(Reason: IoError, mut Bytes: Vector<byte>, CleanupError: IoError?)
pub init(Reason: IoError, mut Bytes: Vector<byte>, CleanupError: IoError?)Transfers proven prefix ownership without copying or allocation. Reason: Failure rebased to Bytes.Length. Bytes: Owned prefix. CleanupError: Optional secondary cleanup failure; owns its reason.
pub init(Reason: IoError, mut Bytes: Vector<byte>)
pub init(Reason: IoError, mut Bytes: Vector<byte>)Supplies the omitted arguments to init. Note: Defaults: CleanupError = none. Reason: Same input, ownership and lifetime contract as the full operation. Bytes: Same input, ownership and lifetime contract as the full operation.