MemorySpec

interface MemorySpec<T : Any>

A specification to read or write custom objects with fixed size in bytes.

Parameters

T

the type of object this spec manages.

Functions

Link copied to clipboard
abstract fun MemoryReader.read(offset: Int): T

Reads the object starting from offset.

Link copied to clipboard
abstract fun MemoryWriter.write(offset: Int, value: T)

Writes the object value starting from offset.

Properties

Link copied to clipboard
abstract val objectSize: Int

Size of T in bytes after serialization.

Sources

Link copied to clipboard