Interface: AnchorStore
Defined in: src/world/anchors/AnchorStore.ts:9
Storage for persistent anchor handles.
Behind an interface so the persistence rules can be unit tested without a browser, and so an app can swap in its own backing store.
Methods
clear()
clear():
void
Defined in: src/world/anchors/AnchorStore.ts:31
Removes every saved record.
Returns
void
load()
load():
AnchorRecord[]
Defined in: src/world/anchors/AnchorStore.ts:14
Reads every saved record, oldest first.
Returns
Saved records, or an empty array when nothing is stored.
remove()
remove(
uuid):void
Defined in: src/world/anchors/AnchorStore.ts:28
Removes a single record.
Parameters
uuid
string
Handle of the record to remove.
Returns
void
save()
save(
record):boolean
Defined in: src/world/anchors/AnchorStore.ts:22
Saves a record, replacing any existing entry with the same uuid.
Parameters
record
The record to save.
Returns
boolean
Whether the record was actually committed. Callers must not tell a user their anchor was saved when storage quietly refused it.