A11 TypeScript API - v0.7.0
    Preparing search index...

    Class ChunkMetadata

    MIME type, timestamp, and binary attributes describing one Chunk. Metadata travels with streamed values so a receiving agent can choose the correct codec and retain application-specific context.

    Index
    attributes: ByteMap

    Owned binary attributes keyed by valid A11 names.

    mimetype: string

    Representation and optional serialized value type.

    timestamp: Date | null

    Source timestamp with millisecond precision in JavaScript.

    • get approxBytes(): number

      Approximate encoded field size.

      Returns number

    • Return a copy of one attribute.

      Parameters

      • key: string

      Returns StatusOr<Uint8Array<ArrayBufferLike>>

    • Set one attribute after validating its name.

      Parameters

      • key: string
      • value: Uint8Array

      Returns Status

    • Encode the concatenated MessagePack metadata record.

      Returns StatusOr<Uint8Array<ArrayBufferLike>>