Module bindings

Module bindings 

Source
Expand description

Query and update functions for a wasm frontend backed by an AssemblageDB.

These bindings expose a DB container that can be used to refresh, sync, broadcast and fetch nodes from JS. All methods return promises, the resulting tiles are serialized as JS objects using serde_json.

Note that most of the wasm implementations have slightly different function signatures than their native counterparts, which is caused by the need for serialization between wasm and JS.

Structs§

DbContainer
An opaque handle to an AssemblageDB that can be used to query and update nodes.

Enums§

BroadcastError
The error type raised if the tile with the specified id could not be broadcast.
RefreshError
The error type raised if the refreshed id is invalid or the view could not be refreshed.
SyncError
The error type raised if the edited blocks cannot be deserialized or inserted.
SyncedSection
A section of a tile that should be persisted in the DB.
SyncedSubsection
A subsection of a tile that should be synced with the DB.

Functions§

open
Opens and returns the DB with the specified name.