Table of Contents

Interface IFieldSink

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

Receives the values of a decoded section, one call per field, in wire order. Implemented as a struct by a zero-allocation decoder, so the generic call is specialized and inlined.

public interface IFieldSink

Methods

Bytes(FieldPlan, scoped ReadOnlySpan<byte>)

A bytes or blob field's content.

void Bytes(FieldPlan field, scoped ReadOnlySpan<byte> bytes)

Parameters

field FieldPlan

The field.

bytes ReadOnlySpan<byte>

The bytes; valid only for the duration of the call.

List(FieldPlan, int, scoped ReadOnlySpan<double>)

A list field: count elements of Components numbers each, flattened.

void List(FieldPlan field, int count, scoped ReadOnlySpan<double> components)

Parameters

field FieldPlan

The field.

count int

The element count.

components ReadOnlySpan<double>

The flattened element values; valid only for the duration of the call.

Number(FieldPlan, scoped ReadOnlySpan<double>)

A numeric field's decoded components (Components of them).

void Number(FieldPlan field, scoped ReadOnlySpan<double> components)

Parameters

field FieldPlan

The field.

components ReadOnlySpan<double>

The values; valid only for the duration of the call.

Text(FieldPlan, scoped ReadOnlySpan<byte>)

A text field's validated UTF-8 bytes.

void Text(FieldPlan field, scoped ReadOnlySpan<byte> utf8)

Parameters

field FieldPlan

The field.

utf8 ReadOnlySpan<byte>

The bytes; valid only for the duration of the call.