rmapi-js
    Preparing search index...

    Interface StateStore

    where a library keeps its saved state: a snapshot and the records appended after it

    Each call happens whole or not at all.

    interface StateStore {
        append(records: Uint8Array<ArrayBufferLike>[]): Promise<void>;
        clear(): Promise<void>;
        load(): Promise<SavedState>;
        replace(snapshot: Uint8Array): Promise<void>;
    }

    Implemented by

    Index
    • adds the records after those held

      Parameters

      • records: Uint8Array<ArrayBufferLike>[]

      Returns Promise<void>

    • removes everything held

      Returns Promise<void>

    • everything held

      Returns Promise<SavedState>

    • replaces everything held with this snapshot and no records

      Parameters

      • snapshot: Uint8Array

      Returns Promise<void>