Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

Read

abstract virtual func Read(buffer: Slice<byte>) -> Result<int, StreamError>

Declaring type: SyncInputStream
Module: System.IO
Assembly: System.Runtime.dll
Source file: SyncInputStream.rvn

Defined by SyncInputStream.Read · Required implementation (no default).

Interface implementation: Required implementation (no default).

Reads up to buffer.Length bytes; short reads are successful.

Parameters

Name Type Description
buffer Slice<Byte> Borrowed writable destination. Bytes beyond the returned count are preserved.

Return value

Result<Int32, StreamError>

A byte count or stream error. Zero means EOF for a nonempty destination; empty reads consume nothing.