Method
Write
abstract virtual func Write(buffer: byte[], offset: int, count: int, cancellationToken: CancellationToken = default) -> Task<Result<void, StreamError>>
Declaring type: OutputStream
Module: System.IO
Assembly: System.Runtime.dll
Source file: OutputStream.rvn
Defined by OutputStream.Write · Required implementation (no default).
Interface implementation: Required implementation (no default).
Writes the entire requested range before reporting success.
Parameters
| Name | Type | Description |
|---|---|---|
buffer |
Byte[] | Source bytes, retained until the task settles. |
offset |
Int32 | First source index. |
count |
Int32 | Number of bytes to write; zero does not extend storage. |
cancellationToken |
CancellationToken | Cancellation produces a cancelled task, not a StreamError. |
Return value
Task<Result<void, StreamError>>
Success only after all requested bytes are accepted, or a stream error.