WorkloadOutputItem
Namespace: Hex1b
Assembly: Hex1b.dll
Represents a chunk of output read from a workload.
csharp
public readonly record struct WorkloadOutputItem : IEquatable<WorkloadOutputItem>Implements
Constructors
WorkloadOutputItem(ReadOnlyMemory<byte>, IReadOnlyList<AnsiToken>?)
Represents a chunk of output read from a workload.
Parameters:
Bytes(ReadOnlyMemory<Byte>): The raw UTF-8 output bytes from the workload.Tokens(IReadOnlyList<AnsiToken>): Optional pre-tokenized representation of Bytes. When provided, it should represent the same output as Bytes.
csharp
public WorkloadOutputItem(ReadOnlyMemory<byte> Bytes, IReadOnlyList<AnsiToken>? Tokens)Properties
Bytes
The raw UTF-8 output bytes from the workload.
Returns: ReadOnlyMemory<Byte>
csharp
public ReadOnlyMemory<byte> Bytes { get; init; }Tokens
Optional pre-tokenized representation of Bytes. When provided, it should represent the same output as Bytes.
Returns: IReadOnlyList<AnsiToken>
csharp
public IReadOnlyList<AnsiToken>? Tokens { get; init; }Remarks
Workloads normally expose output as raw UTF-8 bytes via , which the terminal then decodes and tokenizes.
Some workloads can also provide a pre-tokenized representation of that same output. When is provided, can skip UTF-8 decode and tokenization, reducing allocations and CPU.