encoding/layout/core/core/core library

Classes

BaseLazyStructLayoutBuilder<T, SOURCE, R extends LayoutRepository>
Shared contract for a field whose layout is resolved lazily.
Layout<T>
Base contract every layout implements: byte span plus decode/encode.
LayoutDecodeResult<T>
Result of a decode: the value plus how many bytes it consumed.
LayoutRepository
Marker base for the user-supplied context object threaded through lazy layout builders (see LazyStructLayoutBuilder, LazyMsgPackMapLayoutBuilder).
LazyMsgPackMapLayoutBuilder<K, V, R extends LayoutRepository>
A map value field whose layout is resolved lazily, keyed by K.
LazyStructLayoutBuilder<T, R extends LayoutRepository>
A field of a LazyStructLayout, with its layout resolved lazily and optional decode/encode finalization hooks.
RequestLayoutParams<T, SOURCE, R extends LayoutRepository>
Context passed to a lazy layout builder when it's asked to resolve its layout. encodeValue is only ever set (and required) when encoding.

Enums

LayoutAction
Whether a lazy layout builder is being asked to decode or encode.

Typedefs

CbGetLayoutSpan = List<int> Function(int)
CbLayoutFunc<T> = Layout<T> Function({String? property})
CbLazyStructLayoutFunc<T, R extends LayoutRepository> = Layout<T>? Function(String? property, RequestLayoutParams<T, Map<String, dynamic>, R> params)
CbMsgPackLayoutFunc<K, V, R extends LayoutRepository> = Layout<V>? Function(String? property, RequestLayoutParams<V, Map<K, V>, R> params)
CbOnFinalizeDecode<T, R extends LayoutRepository> = dynamic Function(T layoutResult, Map<String, dynamic> structResult, R? repository)
CbOnFinalizeEncode<T, R extends LayoutRepository> = void Function(T source, Map<String, dynamic> structSource, R? repository)