Table of Contents

Interface ISerde<T>

Namespace
Restate.Sdk
Assembly
Restate.Sdk.dll

Strongly-typed serialization/deserialization interface for Restate handler payloads and state. Named "Serde" for consistency with other Restate SDKs (TypeScript, Java, Python, Rust).

public interface ISerde<T>

Type Parameters

T

Properties

ContentType

Gets the MIME content type used by this serde (e.g. "application/json").

string ContentType { get; }

Property Value

string

Methods

Deserialize(ReadOnlySequence<byte>)

Deserializes a value of type T from the specified data.

T Deserialize(ReadOnlySequence<byte> data)

Parameters

data ReadOnlySequence<byte>

The byte sequence to deserialize from.

Returns

T

The deserialized value.

Serialize(IBufferWriter<byte>, T)

Serializes value to the specified writer.

void Serialize(IBufferWriter<byte> writer, T value)

Parameters

writer IBufferWriter<byte>

The buffer writer to write serialized bytes to.

value T

The value to serialize.