Table of Contents

Interface ICursorCodec<TState>

Namespace
Trellis
Assembly
Trellis.Core.dll

A typed continuation codec. Parsing client input returns failures; encoding invalid server state throws.

public interface ICursorCodec<TState> where TState : notnull

Type Parameters

TState

The complete continuation state, including query context when required.

Extension Methods

Methods

Encode(TState)

Encodes a valid boundary. Implementations must preserve its seek semantics.

Cursor Encode(TState state)

Parameters

state TState

Returns

Cursor

TryDecode(Cursor?, string?)

Decodes and validates client state, returning field-specific failures for invalid tokens.

Result<TState> TryDecode(Cursor? cursor, string? fieldName = null)

Parameters

cursor Cursor
fieldName string

Returns

Result<TState>