Typeberry by Fluffy Labs - v0.4.0
    Preparing search index...

    Class Descriptor<T, V>

    Type descriptor definition.

    The type descriptor can encode & decode given type T, but also have a name and a byte-size hint.

    Descriptors can be composed to form more complex typings.

    Type Parameters

    • T
    • V = T

    Implements

    Index

    Properties

    decode: (d: Decoder) => T

    Decoding function.

    encode: (e: Encoder, elem: T) => void

    Encoding function.

    name: string

    Descriptive name of the coded data.

    sizeHint: SizeHint

    A byte size hint for encoded data.

    skip: (s: Skipper) => void

    Skipping function.

    View: Descriptor<V>

    A "lightweight" version of the object.

    Methods