diff --git a/content/docs/00-introduction/00-overview.md b/content/docs/00-introduction/00-overview.md
index d57d9f7..61eaa86 100644
--- a/content/docs/00-introduction/00-overview.md
+++ b/content/docs/00-introduction/00-overview.md
@@ -12,7 +12,7 @@ You can find the instructions to install the CLI tool for your platform [here](/
To get started running your own standalone instance of SpacetimeDB check out our [Getting Started Guide](/docs/introduction/getting-started).
-
+
## What is SpacetimeDB?
@@ -54,7 +54,7 @@ Each identity has a corresponding authentication token. The authentication token
Additionally, each database has an owner `Identity`. Many database maintenance operations, like publishing a new version or evaluating arbitrary SQL queries, are restricted to only authenticated connections by the owner.
-SpacetimeDB provides tools in the CLI and the [client SDKs](/docs/sdks) for managing credentials.
+SpacetimeDB provides tools in the CLI and the [client SDKs](/docs/sdk/overview) for managing credentials.
## Addresses
@@ -70,8 +70,8 @@ Each client connection has an `Address`. These addresses are opaque, and do not
Currently, Rust is the best-supported language for writing SpacetimeDB modules. Support for lots of other languages is in the works!
-- [Rust](/docs/modules/rust) - [(Quickstart)](/docs/modules/rust/quickstart)
-- [C#](/docs/modules/c-sharp) - [(Quickstart)](/docs/modules/c-sharp/quickstart)
+- [Rust](/docs/module/rust-reference) - [(Quickstart)](/docs/module/rust-quickstart)
+- [C#](/docs/module/c-sharp-reference) - [(Quickstart)](/docs/module/c-sharp-quickstart)
- Python (Coming soon)
- Typescript (Coming soon)
- C++ (Planned)
@@ -79,16 +79,16 @@ Currently, Rust is the best-supported language for writing SpacetimeDB modules.
### Client-side SDKs
-- [Rust](/docs/sdks/rust) - [(Quickstart)](/docs/sdks/rust/quickstart)
-- [C#](/docs/sdks/c-sharp) - [(Quickstart)](/docs/sdks/c-sharp/quickstart)
-- [TypeScript](/docs/sdks/typescript) - [(Quickstart)](/docs/sdks/typescript/quickstart)
+- [Rust](/docs/sdk/rust-reference) - [(Quickstart)](/docs/sdk/rust-quickstart)
+- [C#](/docs/sdk/c-sharp-reference) - [(Quickstart)](/docs/sdk/c-sharp-quickstart)
+- [TypeScript](/docs/sdk/typescript-reference) - [(Quickstart)](/docs/sdk/typescript-quickstart)
- Python (Planned)
- C++ (Planned)
- Lua (Planned)
### Unity
-SpacetimeDB was designed first and foremost as the backend for multiplayer Unity games. To learn more about using SpacetimeDB with Unity, jump on over to the [SpacetimeDB Unity Tutorial](/docs/unity/part-1).
+SpacetimeDB was designed first and foremost as the backend for multiplayer Unity games. To learn more about using SpacetimeDB with Unity, jump on over to the [SpacetimeDB Unity Tutorial](/docs/unity-tutorial/part-1).
## FAQ
@@ -102,7 +102,7 @@ SpacetimeDB was designed first and foremost as the backend for multiplayer Unity
Just install our command line tool and then upload your application to the cloud.
1. How do I create a new database with SpacetimeDB?
- Follow our [Quick Start](/docs/getting-started) guide!
+ Follow our [Quick Start](/docs/introduction/getting-started) guide!
TL;DR in an empty directory:
@@ -112,7 +112,7 @@ spacetime publish
```
5. How do I create a Unity game with SpacetimeDB?
- Follow our [Unity Project](/docs/unity-tutorial) guide!
+ Follow our [Unity Project](/docs/unity-tutorial/overview) guide!
TL;DR in an empty directory:
diff --git a/content/docs/00-introduction/10-getting-started.md b/content/docs/00-introduction/10-getting-started.md
index ad5578c..38028b1 100644
--- a/content/docs/00-introduction/10-getting-started.md
+++ b/content/docs/00-introduction/10-getting-started.md
@@ -22,14 +22,14 @@ You are ready to start developing SpacetimeDB modules. See below for a quickstar
### Server (Module)
-- [Rust](/docs/modules/rust/quickstart)
-- [C#](/docs/modules/c-sharp/quickstart)
+- [Rust](/docs/module/rust-quickstart)
+- [C#](/docs/module/c-sharp-quickstart)
⚡**Note:** Rust is [roughly 2x faster](https://faun.dev/c/links/faun/c-vs-rust-vs-go-a-performance-benchmarking-in-kubernetes/) than C#
### Client
-- [Rust](/docs/sdks/rust/quickstart)
-- [C# (Standalone)](/docs/sdks/c-sharp/quickstart)
-- [C# (Unity)](/docs/unity/part-1)
-- [Typescript](/docs/sdks/typescript/quickstart)
+- [Rust](/docs/sdk/rust-quickstart)
+- [C# (Standalone)](/docs/sdk/c-sharp-quickstart)
+- [C# (Unity)](/docs/unity-tutorial/part-1)
+- [Typescript](/docs/sdk/typescript-quickstart)
diff --git a/content/docs/02-unity-tutorial/00-overview.md b/content/docs/02-unity-tutorial/00-overview.md
index 40d0d32..86d678f 100644
--- a/content/docs/02-unity-tutorial/00-overview.md
+++ b/content/docs/02-unity-tutorial/00-overview.md
@@ -13,16 +13,16 @@ Tested with UnityEngine `2022.3.20f1 LTS` (and may also work on newer versions).
## Unity Tutorial - Basic Multiplayer
-Get started with the core client-server setup. For part 2, you may choose your server module preference of [Rust](/docs/modules/rust) or [C#](/docs/modules/c-sharp):
+Get started with the core client-server setup. For part 2, you may choose your server module preference of [Rust](/docs/module/rust-reference) or [C#](/docs/module/c-sharp-reference).
-- [Part 1 - Setup](/docs/unity/part-1)
-- [Part 2a - Server (Rust)](/docs/unity/part-2a-rust)
-- [Part 2b - Server (C#)](/docs/unity/part-2b-c-sharp)
-- [Part 3 - Client](/docs/unity/part-3)
+- [Part 1 - Setup](/docs/unity-tutorial/part-1)
+- [Part 2a - Server (Rust)](/docs/unity-tutorial/part-2a-rust)
+- [Part 2b - Server (C#)](/docs/unity-tutorial/part-2b-c-sharp)
+- [Part 3 - Client](/docs/unity-tutorial/part-3)
## Unity Tutorial - Advanced
By this point, you should already have a basic understanding of SpacetimeDB client, server and CLI:
-- [Part 4 - Resources & Scheduling](/docs/unity/part-4)
-- [Part 5 - BitCraft Mini](/docs/unity/part-5)
+- [Part 4 - Resources & Scheduling](/docs/unity-advanced/part-4)
+- [Part 5 - BitCraft Mini](/docs/unity-advanced/part-5)
diff --git a/content/docs/02-unity-tutorial/20-part-2a-rust.md b/content/docs/02-unity-tutorial/20-part-2a-rust.md
index 3557566..2e46131 100644
--- a/content/docs/02-unity-tutorial/20-part-2a-rust.md
+++ b/content/docs/02-unity-tutorial/20-part-2a-rust.md
@@ -5,7 +5,7 @@ navTitle: 2a - Server (Rust)
Need help with the tutorial? [Join our Discord server](https://discord.gg/spacetimedb)!
-This progressive tutorial is continued from the [Part 1 Tutorial](/docs/unity/part-1)
+This progressive tutorial is continued from the [Part 1 Tutorial](/docs/unity-tutorial/part-1)
## Create a Server Module
@@ -32,7 +32,7 @@ use spacetimedb::{spacetimedb, Identity, SpacetimeType, ReducerContext};
use log;
```
-Then we are going to start by adding the global `Config` table. Right now it only contains the "message of the day" but it can be extended to store other configuration variables. This also uses a couple of macros, like `#[spacetimedb(table)]` which you can learn more about in our [Rust module reference](/docs/modules/rust) (including making your tables `private`!). Simply put, this just tells SpacetimeDB to create a table which uses this struct as the schema for the table.
+Then we are going to start by adding the global `Config` table. Right now it only contains the "message of the day" but it can be extended to store other configuration variables. This also uses a couple of macros, like `#[spacetimedb(table)]` which you can learn more about in our [Rust module reference](/docs/module/rust-reference) (including making your tables `private`!). Simply put, this just tells SpacetimeDB to create a table which uses this struct as the schema for the table.
**Append to the bottom of lib.rs:**
@@ -314,4 +314,4 @@ Now that we added chat support, let's publish the latest module version to Space
spacetime publish -c unity-tutorial
```
-From here, the [next tutorial](/docs/unity/part-3) continues with a Client (Unity) focus.
+From here, the [next tutorial](/docs/unity-tutorial/part-3) continues with a Client (Unity) focus.
diff --git a/content/docs/02-unity-tutorial/21-part-2b-c-sharp.md b/content/docs/02-unity-tutorial/21-part-2b-c-sharp.md
index 2ecfe2c..b73a14b 100644
--- a/content/docs/02-unity-tutorial/21-part-2b-c-sharp.md
+++ b/content/docs/02-unity-tutorial/21-part-2b-c-sharp.md
@@ -5,7 +5,7 @@ navTitle: 2b - Server (C#)
Need help with the tutorial? [Join our Discord server](https://discord.gg/spacetimedb)!
-This progressive tutorial is continued from the [Part 1 Tutorial](/docs/unity/part-1)
+This progressive tutorial is continued from the [Part 1 Tutorial](/docs/unity-tutorial/part-1)
## Create a Server Module
@@ -33,7 +33,7 @@ using SpacetimeDB.Module;
using static SpacetimeDB.Runtime;
```
-Then we are going to start by adding the global `Config` table. Right now it only contains the "message of the day" but it can be extended to store other configuration variables. This also uses a couple of attributes, like `[SpacetimeDB.Table]` which you can learn more about in our [C# module reference](/docs/modules/c-sharp). Simply put, this just tells SpacetimeDB to create a table which uses this struct as the schema for the table.
+Then we are going to start by adding the global `Config` table. Right now it only contains the "message of the day" but it can be extended to store other configuration variables. This also uses a couple of attributes, like `[SpacetimeDB.Table]` which you can learn more about in our [C# module reference](/docs/module/c-sharp-reference). Simply put, this just tells SpacetimeDB to create a table which uses this struct as the schema for the table.
**Append to the bottom of lib.cs:**
@@ -340,4 +340,4 @@ cd server
spacetime publish -c unity-tutorial
```
-From here, the [next tutorial](/docs/unity/part-3) continues with a Client (Unity) focus.
+From here, the [next tutorial](/docs/unity-tutorial/part-3) continues with a Client (Unity) focus.
diff --git a/content/docs/02-unity-tutorial/30-part-3.md b/content/docs/02-unity-tutorial/30-part-3.md
index 39ffde8..d02b9cc 100644
--- a/content/docs/02-unity-tutorial/30-part-3.md
+++ b/content/docs/02-unity-tutorial/30-part-3.md
@@ -7,8 +7,8 @@ Need help with the tutorial? [Join our Discord server](https://discord.gg/spacet
This progressive tutorial is continued from one of the Part 2 tutorials:
-- [Rust Server Module](/docs/unity/part-2a-rust)
-- [C# Server Module](/docs/unity/part-2b-c-sharp)
+- [Rust Server Module](/docs/unity-tutorial/part-2a-rust)
+- [C# Server Module](/docs/unity-tutorial/part-2b-c-sharp)
## Updating our Unity Project Client to use SpacetimeDB
@@ -467,7 +467,7 @@ Now when you run the game you should be able to send chat messages to other play
This concludes the SpacetimeDB basic multiplayer tutorial, where we learned how to create a multiplayer game. In the next Unity tutorial, we will add resource nodes to the game and learn about _scheduled_ reducers:
-From here, the tutorial continues with more-advanced topics: The [next tutorial](/docs/unity/part-4) introduces Resources & Scheduling.
+From here, the tutorial continues with more-advanced topics: The [next tutorial](/docs/unity-advanced/part-4) introduces Resources & Scheduling.
---
diff --git a/content/docs/03-unity-advanced/00-part-4.md b/content/docs/03-unity-advanced/00-part-4.md
index b5899f8..e4ed58f 100644
--- a/content/docs/03-unity-advanced/00-part-4.md
+++ b/content/docs/03-unity-advanced/00-part-4.md
@@ -5,7 +5,7 @@ navTitle: 4 - Resources & Scheduling
Need help with the tutorial? [Join our Discord server](https://discord.gg/spacetimedb)!
-This progressive tutorial is continued from the [Part 3](/docs/unity/part-3) Tutorial.
+This progressive tutorial is continued from the [Part 3](/docs/unity-tutorial/part-3) Tutorial.
**Oct 14th, 2023: This tutorial has not yet been updated for the recent 0.7.0 release, it will be updated asap!**
diff --git a/content/docs/03-unity-advanced/10-part-5.md b/content/docs/03-unity-advanced/10-part-5.md
index b1524b5..ac4d7f4 100644
--- a/content/docs/03-unity-advanced/10-part-5.md
+++ b/content/docs/03-unity-advanced/10-part-5.md
@@ -5,7 +5,7 @@ navTitle: 5 - BitCraft Mini
Need help with the tutorial? [Join our Discord server](https://discord.gg/spacetimedb)!
-This progressive tutorial is continued from the [Part 4](/docs/unity/part-3) Tutorial.
+This progressive tutorial is continued from the [Part 4](/docs/unity-tutorial/part-3) Tutorial.
**Oct 14th, 2023: This tutorial has not yet been updated for the recent 0.7.0 release, it will be updated asap!**
diff --git a/content/docs/04-module/00-overview.md b/content/docs/04-module/00-overview.md
index 000367f..2ffee0c 100644
--- a/content/docs/04-module/00-overview.md
+++ b/content/docs/04-module/00-overview.md
@@ -13,15 +13,15 @@ In the following sections, we'll cover the basics of server modules and how to c
As of SpacetimeDB 0.6, Rust is the only fully supported language for server modules. Rust is a great option for server modules because it is fast, safe, and has a small runtime.
-- [Rust Module Reference](/docs/modules/rust)
-- [Rust Module Quickstart Guide](/docs/modules/rust/quickstart)
+- [Rust Module Reference](/docs/module/rust-reference)
+- [Rust Module Quickstart Guide](/docs/module/rust-quickstart)
### C#
We have C# support available in experimental status. C# can be a good choice for developers who are already using Unity or .net for their client applications.
-- [C# Module Reference](/docs/modules/c-sharp)
-- [C# Module Quickstart Guide](/docs/modules/c-sharp/quickstart)
+- [C# Module Reference](/docs/module/c-sharp-reference)
+- [C# Module Quickstart Guide](/docs/module/c-sharp-quickstart)
### Coming Soon
diff --git a/content/docs/04-module/10-rust-quickstart.md b/content/docs/04-module/10-rust-quickstart.md
index 7f7c4f0..56d0758 100644
--- a/content/docs/04-module/10-rust-quickstart.md
+++ b/content/docs/04-module/10-rust-quickstart.md
@@ -274,6 +274,6 @@ spacetime sql "SELECT * FROM Message"
You can find the full code for this module [in the SpacetimeDB module examples](https://github.com/clockworklabs/SpacetimeDB/tree/master/modules/quickstart-chat).
-You've just set up your first database in SpacetimeDB! The next step would be to create a client module that interacts with this module. You can use any of SpacetimDB's supported client languages to do this. Take a look at the quickstart guide for your client language of choice: [Rust](/docs/sdks/rust/quickstart), [C#](/docs/sdks/c-sharp/quickstart), or [TypeScript](/docs/sdks/typescript/quickstart).
+You've just set up your first database in SpacetimeDB! The next step would be to create a client module that interacts with this module. You can use any of SpacetimDB's supported client languages to do this. Take a look at the quickstart guide for your client language of choice: [Rust](/docs/sdk/rust-quickstart), [C#](/docs/sdk/c-sharp-quickstart), or [TypeScript](/docs/sdk/typescript-quickstart).
-If you are planning to use SpacetimeDB with the Unity game engine, you can skip right to the [Unity Comprehensive Tutorial](/docs/unity/part-1) or check out our example game, [BitcraftMini](/docs/unity/part-3).
+If you are planning to use SpacetimeDB with the Unity game engine, you can skip right to the [Unity Comprehensive Tutorial](/docs/unity-tutorial/part-1) or check out our example game, [BitcraftMini](/docs/unity-advanced/part-5).
diff --git a/content/docs/04-module/20-c-sharp-quickstart.md b/content/docs/04-module/20-c-sharp-quickstart.md
index 2b3cba4..608c41d 100644
--- a/content/docs/04-module/20-c-sharp-quickstart.md
+++ b/content/docs/04-module/20-c-sharp-quickstart.md
@@ -315,6 +315,6 @@ spacetime sql "SELECT * FROM Message"
## What's next?
-You've just set up your first database in SpacetimeDB! The next step would be to create a client module that interacts with this module. You can use any of SpacetimDB's supported client languages to do this. Take a look at the quick start guide for your client language of choice: [Rust](/docs/languages/rust/rust-sdk-quickstart-guide), [C#](/docs/languages/csharp/csharp-sdk-quickstart-guide), or [TypeScript](/docs/languages/typescript/typescript-sdk-quickstart-guide).
+You've just set up your first database in SpacetimeDB! The next step would be to create a client module that interacts with this module. You can use any of SpacetimDB's supported client languages to do this. Take a look at the quick start guide for your client language of choice: [Rust](/docs/sdk/rust-quickstart), [C#](/docs/sdk/c-sharp-quickstart), or [TypeScript](/docs/sdk/typescript-quickstart).
-If you are planning to use SpacetimeDB with the Unity game engine, you can skip right to the [Unity Comprehensive Tutorial](/docs/unity/part-1) or check out our example game, [BitcraftMini](/docs/unity/part-3).
+If you are planning to use SpacetimeDB with the Unity game engine, you can skip right to the [Unity Comprehensive Tutorial](/docs/unity-tutorial/part-1) or check out our example game, [BitcraftMini](/docs/unity-advanced/part-5).
diff --git a/content/docs/05-sdk/00-overview.md b/content/docs/05-sdk/00-overview.md
index 3b23096..902bec7 100644
--- a/content/docs/05-sdk/00-overview.md
+++ b/content/docs/05-sdk/00-overview.md
@@ -5,9 +5,9 @@ navTitle: Overview
The SpacetimeDB Client SDKs provide a comprehensive interface to interact with the SpacetimeDB server engine from various programming languages. Currently, SDKs are available for
-- [Rust](/docs/sdks/rust) - [(Quickstart)](/docs/sdks/rust/quickstart)
-- [C#](/docs/sdks/c-sharp) - [(Quickstart)](/docs/sdks/c-sharp/quickstart)
-- [TypeScript](/docs/sdks/typescript) - [(Quickstart)](/docs/sdks/typescript/quickstart)
+- [Rust](/docs/sdk/rust-reference) - [(Quickstart)](/docs/sdk/rust-quickstart)
+- [C#](/docs/sdk/c-sharp-reference) - [(Quickstart)](/docs/sdk/c-sharp-quickstart)
+- [TypeScript](/docs/sdk/typescript-reference) - [(Quickstart)](/docs/sdk/typescript-quickstart)
## Key Features
diff --git a/content/docs/05-sdk/10-typescript-quickstart.md b/content/docs/05-sdk/10-typescript-quickstart.md
index 00ac483..8b2ed11 100644
--- a/content/docs/05-sdk/10-typescript-quickstart.md
+++ b/content/docs/05-sdk/10-typescript-quickstart.md
@@ -9,7 +9,7 @@ We'll implement a basic single page web app for the module created in our Rust o
## Project structure
-Enter the directory `quickstart-chat` you created in the [Rust Module Quickstart](/docs/modules/rust/quickstart) or [C# Module Quickstart](/docs/modules/c-sharp/quickstart) guides:
+Enter the directory `quickstart-chat` you created in the [Rust Module Quickstart](/docs/module/rust-quickstart) or [C# Module Quickstart](/docs/module/c-sharp-quickstart) guides:
```bash
cd quickstart-chat
diff --git a/content/docs/05-sdk/11-typescript-reference.md b/content/docs/05-sdk/11-typescript-reference.md
index db4b09a..26acd2c 100644
--- a/content/docs/05-sdk/11-typescript-reference.md
+++ b/content/docs/05-sdk/11-typescript-reference.md
@@ -94,13 +94,13 @@ console.log(Person, AddReducer, SayHelloReducer);
### Classes
-| Class | Description |
-| ----------------------------------------------- | ---------------------------------------------------------------------------- |
-| [`SpacetimeDBClient`](#class-spacetimedbclient) | The database client connection to a SpacetimeDB server. |
-| [`Identity`](#class-identity) | The user's public identity. |
-| [`Address`](#class-address) | An opaque identifier for differentiating connections by the same `Identity`. |
-| [`{Table}`](#class-table) | `{Table}` is a placeholder for each of the generated tables. |
-| [`{Reducer}`](#class-reducer) | `{Reducer}` is a placeholder for each of the generated reducers. |
+| Class | Description |
+| --------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| [`SpacetimeDBClient`](#api-at-a-glance-class-spacetimedbclient) | The database client connection to a SpacetimeDB server. |
+| [`Identity`](#events-class-identity) | The user's public identity. |
+| [`Address`](#methods-class-address) | An opaque identifier for differentiating connections by the same `Identity`. |
+| [`{Table}`](#methods-class-table) | `{Table}` is a placeholder for each of the generated tables. |
+| [`{Reducer}`](#methods-class-reducer) | `{Reducer}` is a placeholder for each of the generated reducers. |
### Class `SpacetimeDBClient`
@@ -108,20 +108,20 @@ The database client connection to a SpacetimeDB server.
Defined in [spacetimedb-sdk.spacetimedb](https://github.com/clockworklabs/spacetimedb-typescript-sdk/blob/main/src/spacetimedb.ts):
-| Constructors | Description |
-| ----------------------------------------------------------------- | ------------------------------------------------------------------------ |
-| [`SpacetimeDBClient.constructor`](#spacetimedbclient-constructor) | Creates a new `SpacetimeDBClient` database client. |
-| Properties |
-| [`SpacetimeDBClient.identity`](#spacetimedbclient-identity) | The user's public identity. |
-| [`SpacetimeDBClient.live`](#spacetimedbclient-live) | Whether the client is connected. |
-| [`SpacetimeDBClient.token`](#spacetimedbclient-token) | The user's private authentication token. |
-| Methods | |
-| [`SpacetimeDBClient.connect`](#spacetimedbclient-connect) | Connect to a SpacetimeDB module. |
-| [`SpacetimeDBClient.disconnect`](#spacetimedbclient-disconnect) | Close the current connection. |
-| [`SpacetimeDBClient.subscribe`](#spacetimedbclient-subscribe) | Subscribe to a set of queries. |
-| Events | |
-| [`SpacetimeDBClient.onConnect`](#spacetimedbclient-onconnect) | Register a callback to be invoked upon authentication with the database. |
-| [`SpacetimeDBClient.onError`](#spacetimedbclient-onerror) | Register a callback to be invoked upon a error. |
+| Constructors | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+| [`SpacetimeDBClient.constructor`](#constructors-spacetimedbclient-constructor) | Creates a new `SpacetimeDBClient` database client. |
+| Properties |
+| [`SpacetimeDBClient.identity`](#properties-spacetimedbclient-identity) | The user's public identity. |
+| [`SpacetimeDBClient.live`](#properties-spacetimedbclient-live) | Whether the client is connected. |
+| [`SpacetimeDBClient.token`](#properties-spacetimedbclient-token) | The user's private authentication token. |
+| Methods | |
+| [`SpacetimeDBClient.connect`](#properties-spacetimedbclient-connect) | Connect to a SpacetimeDB module. |
+| [`SpacetimeDBClient.disconnect`](#properties-spacetimedbclient-disconnect) | Close the current connection. |
+| [`SpacetimeDBClient.subscribe`](#properties-spacetimedbclient-subscribe) | Subscribe to a set of queries. |
+| Events | |
+| [`SpacetimeDBClient.onConnect`](#events-spacetimedbclient-onconnect) | Register a callback to be invoked upon authentication with the database. |
+| [`SpacetimeDBClient.onError`](#events-spacetimedbclient-onerror) | Register a callback to be invoked upon a error. |
## Constructors
@@ -214,7 +214,7 @@ SpacetimeDBClient.registerTables(User, Player);
### `SpacetimeDBClient` identity
-The user's public [Identity](#class-identity).
+The user's public [Identity](#events-class-identity).
```
identity: Identity | undefined
@@ -259,11 +259,11 @@ connect(host: string?, name_or_address: string?, auth_token: string?): Promise A new call to `subscribe` will remove all previous subscriptions and replace them with the new `queries`.
> If any rows matched the previous subscribed queries but do not match the new queries,
-> those rows will be removed from the client cache, and [`{Table}.on_delete`](#table-ondelete) callbacks will be invoked for them.
+> those rows will be removed from the client cache, and [`{Table}.on_delete`](#methods-table-ondelete) callbacks will be invoked for them.
```ts
subscribe(queryOrQueries: string | string[]): void
@@ -344,15 +344,15 @@ Register a callback to be invoked upon authentication with the database.
onConnect(callback: (token: string, identity: Identity) => void): void
```
-The callback will be invoked with the public user [Identity](#class-identity), private authentication token and connection [`Address`](#class-address) provided by the database. If credentials were supplied to [connect](#spacetimedbclient-connect), those passed to the callback will be equivalent to the ones used to connect. If the initial connection was anonymous, a new set of credentials will be generated by the database to identify this user.
+The callback will be invoked with the public user [Identity](#events-class-identity), private authentication token and connection [`Address`](#methods-class-address) provided by the database. If credentials were supplied to [connect](#properties-spacetimedbclient-connect), those passed to the callback will be equivalent to the ones used to connect. If the initial connection was anonymous, a new set of credentials will be generated by the database to identify this user.
The credentials passed to the callback can be saved and used to authenticate the same user in future connections.
#### Parameters
-| Name | Type |
-| :--------- | :--------------------------------------------------------------------------------------------------------------- |
-| `callback` | (`token`: `string`, `identity`: [`Identity`](#class-identity), `address`: [`Address`](#class-address)) => `void` |
+| Name | Type |
+| :--------- | :------------------------------------------------------------------------------------------------------------------------------ |
+| `callback` | (`token`: `string`, `identity`: [`Identity`](#events-class-identity), `address`: [`Address`](#methods-class-address)) => `void` |
#### Example
@@ -395,14 +395,14 @@ A unique public identifier for a user of a database.
Defined in [spacetimedb-sdk.identity](https://github.com/clockworklabs/spacetimedb-typescript-sdk/blob/main/src/identity.ts):
-| Constructors | Description |
-| ----------------------------------------------- | -------------------------------------------- |
-| [`Identity.constructor`](#identity-constructor) | Creates a new `Identity`. |
-| Methods | |
-| [`Identity.isEqual`](#identity-isequal) | Compare two identities for equality. |
-| [`Identity.toHexString`](#identity-tohexstring) | Print the identity as a hexadecimal string. |
-| Static methods | |
-| [`Identity.fromString`](#identity-fromstring) | Parse an Identity from a hexadecimal string. |
+| Constructors | Description |
+| ------------------------------------------------------------ | -------------------------------------------- |
+| [`Identity.constructor`](#constructors-identity-constructor) | Creates a new `Identity`. |
+| Methods | |
+| [`Identity.isEqual`](#methods-identity-isequal) | Compare two identities for equality. |
+| [`Identity.toHexString`](#methods-identity-tohexstring) | Print the identity as a hexadecimal string. |
+| Static methods | |
+| [`Identity.fromString`](#methods-identity-fromstring) | Parse an Identity from a hexadecimal string. |
## Constructors
@@ -430,9 +430,9 @@ isEqual(other: Identity): boolean
#### Parameters
-| Name | Type |
-| :------ | :---------------------------- |
-| `other` | [`Identity`](#class-identity) |
+| Name | Type |
+| :------ | :----------------------------------- |
+| `other` | [`Identity`](#events-class-identity) |
#### Returns
@@ -470,22 +470,22 @@ Identity.fromString(str: string): Identity
#### Returns
-[`Identity`](#class-identity)
+[`Identity`](#events-class-identity)
### Class `Address`
-An opaque identifier for a client connection to a database, intended to differentiate between connections from the same [`Identity`](#type-identity).
+An opaque identifier for a client connection to a database, intended to differentiate between connections from the same [`Identity`](#events-class-identity).
Defined in [spacetimedb-sdk.address](https://github.com/clockworklabs/spacetimedb-typescript-sdk/blob/main/src/address.ts):
-| Constructors | Description |
-| --------------------------------------------- | ------------------------------------------- |
-| [`Address.constructor`](#address-constructor) | Creates a new `Address`. |
-| Methods | |
-| [`Address.isEqual`](#address-isequal) | Compare two identities for equality. |
-| [`Address.toHexString`](#address-tohexstring) | Print the address as a hexadecimal string. |
-| Static methods | |
-| [`Address.fromString`](#address-fromstring) | Parse an Address from a hexadecimal string. |
+| Constructors | Description |
+| ---------------------------------------------------------- | ------------------------------------------- |
+| [`Address.constructor`](#constructors-address-constructor) | Creates a new `Address`. |
+| Methods | |
+| [`Address.isEqual`](#methods-address-isequal) | Compare two identities for equality. |
+| [`Address.toHexString`](#methods-address-tohexstring) | Print the address as a hexadecimal string. |
+| Static methods | |
+| [`Address.fromString`](#methods-address-fromstring) | Parse an Address from a hexadecimal string. |
## Constructors
@@ -513,9 +513,9 @@ isEqual(other: Address): boolean
#### Parameters
-| Name | Type |
-| :------ | :-------------------------- |
-| `other` | [`Address`](#class-address) |
+| Name | Type |
+| :------ | :---------------------------------- |
+| `other` | [`Address`](#methods-class-address) |
#### Returns
@@ -553,7 +553,7 @@ Address.fromString(str: string): Address
#### Returns
-[`Address`](#class-address)
+[`Address`](#methods-class-address)
### Class `{Table}`
@@ -561,22 +561,21 @@ For each table defined by a module, `spacetime generate` generates a `class` in
The generated class has a field for each of the table's columns, whose names are the column names converted to `snake_case`.
-| Properties | Description |
-| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
-| [`Table.name`](#table-name) | The name of the class. |
-| [`Table.tableName`](#table-tableName) | The name of the table in the database. |
-| Methods | |
-| [`Table.isEqual`](#table-isequal) | Method to compare two identities. |
-| [`Table.all`](#table-all) | Return all the subscribed rows in the table. |
-| [`Table.filterBy{COLUMN}`](#table-filterbycolumn) | Autogenerated; return subscribed rows with a given value in a particular column. `{COLUMN}` is a placeholder for a column name. |
-| [`Table.findBy{COLUMN}`](#table-findbycolumn) | Autogenerated; return a subscribed row with a given value in a particular unique column. `{COLUMN}` is a placeholder for a column name. |
-| Events | |
-| [`Table.onInsert`](#table-oninsert) | Register an `onInsert` callback for when a subscribed row is newly inserted into the database. |
-| [`Table.removeOnInsert`](#table-removeoninsert) | Unregister a previously-registered [`onInsert`](#table-oninsert) callback. |
-| [`Table.onUpdate`](#table-onupdate) | Register an `onUpdate` callback for when an existing row is modified. |
-| [`Table.removeOnUpdate`](#table-removeonupdate) | Unregister a previously-registered [`onUpdate`](#table-onupdate) callback. |
-| [`Table.onDelete`](#table-ondelete) | Register an `onDelete` callback for when a subscribed row is removed from the database. |
-| [`Table.removeOnDelete`](#table-removeondelete) | Unregister a previously-registered [`onDelete`](#table-removeondelete) callback. |
+| Properties | Description |
+| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
+| [`Table.name`](#properties-table-name) | The name of the class. |
+| [`Table.tableName`](#properties-table-tablename) | The name of the table in the database. |
+| Methods | |
+| [`Table.all`](#methods-table-all) | Return all the subscribed rows in the table. |
+| [`Table.filterBy{COLUMN}`](#methods-table-filterby-column) | Autogenerated; return subscribed rows with a given value in a particular column. `{COLUMN}` is a placeholder for a column name. |
+| [`Table.findBy{COLUMN}`](#methods-table-findby-column) | Autogenerated; return a subscribed row with a given value in a particular unique column. `{COLUMN}` is a placeholder for a column name. |
+| Events | |
+| [`Table.onInsert`](#methods-table-oninsert) | Register an `onInsert` callback for when a subscribed row is newly inserted into the database. |
+| [`Table.removeOnInsert`](#methods-table-removeoninsert) | Unregister a previously-registered [`onInsert`](#methods-table-oninsert) callback. |
+| [`Table.onUpdate`](#methods-table-onupdate) | Register an `onUpdate` callback for when an existing row is modified. |
+| [`Table.removeOnUpdate`](#methods-table-removeonupdate) | Unregister a previously-registered [`onUpdate`](#methods-table-onupdate) callback. |
+| [`Table.onDelete`](#methods-table-ondelete) | Register an `onDelete` callback for when a subscribed row is removed from the database. |
+| [`Table.removeOnDelete`](#methods-table-removeondelete) | Unregister a previously-registered [`onDelete`](#methods-table-removeondelete) callback. |
## Properties
@@ -810,7 +809,7 @@ Person.onInsert((person, reducerEvent) => {
### {Table} removeOnInsert
-Unregister a previously-registered [`onInsert`](#table-oninsert) callback.
+Unregister a previously-registered [`onInsert`](#methods-table-oninsert) callback.
```ts
{Table}.removeOnInsert(callback: (value: Person, reducerEvent: ReducerEvent | undefined) => void): void
@@ -860,7 +859,7 @@ Person.onUpdate((oldPerson, newPerson, reducerEvent) => {
### {Table} removeOnUpdate
-Unregister a previously-registered [`onUpdate`](#table-onUpdate) callback.
+Unregister a previously-registered [`onUpdate`](#methods-table-onupdate) callback.
```ts
{Table}.removeOnUpdate(callback: (oldValue: {Table}, newValue: {Table}, reducerEvent: ReducerEvent | undefined) => void): void
@@ -915,7 +914,7 @@ Person.onDelete((person, reducerEvent) => {
### {Table} removeOnDelete
-Unregister a previously-registered [`onDelete`](#table-onDelete) callback.
+Unregister a previously-registered [`onDelete`](#methods-table-ondelete) callback.
```ts
{Table}.removeOnDelete(callback: (value: {Table}, reducerEvent: ReducerEvent | undefined) => void): void
@@ -933,11 +932,11 @@ Unregister a previously-registered [`onDelete`](#table-onDelete) callback.
The class's name will be the reducer's name converted to `PascalCase`.
-| Static methods | Description |
-| ------------------------------- | ------------------------------------------------------------ |
-| [`Reducer.call`](#reducer-call) | Executes the reducer. |
-| Events | |
-| [`Reducer.on`](#reducer-on) | Register a callback to run each time the reducer is invoked. |
+| Static methods | Description |
+| ---------------------------------------------- | ------------------------------------------------------------ |
+| [`Reducer.call`](#static-methods-reducer-call) | Executes the reducer. |
+| Events | |
+| [`Reducer.on`](#events-reducer-on) | Register a callback to run each time the reducer is invoked. |
## Static methods
diff --git a/content/docs/05-sdk/20-rust-quickstart.md b/content/docs/05-sdk/20-rust-quickstart.md
index 422b7ac..aab9a88 100644
--- a/content/docs/05-sdk/20-rust-quickstart.md
+++ b/content/docs/05-sdk/20-rust-quickstart.md
@@ -9,7 +9,7 @@ We'll implement a command-line client for the module created in our Rust or C# M
## Project structure
-Enter the directory `quickstart-chat` you created in the [Rust Module Quickstart](/docs/modules/rust/quickstart) or [C# Module Quickstart](/docs/modules/c-sharp/quickstart) guides:
+Enter the directory `quickstart-chat` you created in the [Rust Module Quickstart](/docs/module/rust-quickstart) or [C# Module Quickstart](/docs/module/c-sharp-quickstart) guides:
```bash
cd quickstart-chat
@@ -474,7 +474,7 @@ User connected.
You can find the full code for this client [in the Rust SDK's examples](https://github.com/clockworklabs/SpacetimeDB/tree/master/crates/sdk/examples/quickstart-chat).
-Check out the [Rust SDK Reference](/docs/sdks/rust) for a more comprehensive view of the SpacetimeDB Rust SDK.
+Check out the [Rust SDK Reference](/docs/sdk/rust-reference) for a more comprehensive view of the SpacetimeDB Rust SDK.
Our bare-bones terminal interface has some quirks. Incoming messages can appear while the user is typing and be spliced into the middle of user input, which is less than ideal. Also, the user's input is interspersed with the program's output, so messages the user sends will seem to appear twice. Why not try building a better interface using [Rustyline](https://crates.io/crates/rustyline), [Cursive](https://crates.io/crates/cursive), or even a full-fledged GUI? We went for the Cursive route, and you can check out what we came up with [in the Rust SDK's examples](https://github.com/clockworklabs/SpacetimeDB/tree/master/crates/sdk/examples/cursive-chat).
diff --git a/content/docs/05-sdk/21-rust-reference.md b/content/docs/05-sdk/21-rust-reference.md
index c4a999b..99c6378 100644
--- a/content/docs/05-sdk/21-rust-reference.md
+++ b/content/docs/05-sdk/21-rust-reference.md
@@ -34,53 +34,53 @@ mod module_bindings;
## API at a glance
-| Definition | Description |
-| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
-| Function [`module_bindings::connect`](#function-connect) | Autogenerated function to connect to a database. |
-| Function [`spacetimedb_sdk::disconnect`](#function-disconnect) | Close the active connection. |
-| Function [`spacetimedb_sdk::on_disconnect`](#function-on_disconnect) | Register a `FnMut` callback to run when a connection ends. |
-| Function [`spacetimedb_sdk::once_on_disconnect`](#function-once_on_disconnect) | Register a `FnOnce` callback to run the next time a connection ends. |
-| Function [`spacetimedb_sdk::remove_on_disconnect`](#function-remove_on_disconnect) | Cancel an `on_disconnect` or `once_on_disconnect` callback. |
-| Function [`spacetimedb_sdk::subscribe`](#function-subscribe) | Subscribe to queries with a `&[&str]`. |
-| Function [`spacetimedb_sdk::subscribe_owned`](#function-subscribe_owned) | Subscribe to queries with a `Vec`. |
-| Function [`spacetimedb_sdk::on_subscription_applied`](#function-on_subscription_applied) | Register a `FnMut` callback to run when a subscription's initial rows become available. |
-| Function [`spacetimedb_sdk::once_on_subscription_applied`](#function-once_on_subscription_applied) | Register a `FnOnce` callback to run the next time a subscription's initial rows become available. |
-| Function [`spacetimedb_sdk::remove_on_subscription_applied`](#function-remove_on_subscription_applied) | Cancel an `on_subscription_applied` or `once_on_subscription_applied` callback. |
-| Type [`spacetimedb_sdk::identity::Identity`](#type-identity) | A unique public identifier for a client. |
-| Type [`spacetimedb_sdk::identity::Token`](#type-token) | A private authentication token corresponding to an `Identity`. |
-| Type [`spacetimedb_sdk::identity::Credentials`](#type-credentials) | An `Identity` paired with its `Token`. |
-| Type [`spacetimedb_sdk::Address`](#type-address) | An opaque identifier for differentiating connections by the same `Identity`. |
-| Function [`spacetimedb_sdk::identity::identity`](#function-identity) | Return the current connection's `Identity`. |
-| Function [`spacetimedb_sdk::identity::token`](#function-token) | Return the current connection's `Token`. |
-| Function [`spacetimedb_sdk::identity::credentials`](#function-credentials) | Return the current connection's [`Credentials`](#type-credentials). |
-| Function [`spacetimedb_sdk::identity::address`](#function-address) | Return the current connection's [`Address`](#type-address). |
-| Function [`spacetimedb_sdk::identity::on_connect`](#function-on_connect) | Register a `FnMut` callback to run when the connection's [`Credentials`](#type-credentials) are verified with the database. |
-| Function [`spacetimedb_sdk::identity::once_on_connect`](#function-once_on_connect) | Register a `FnOnce` callback to run when the connection's [`Credentials`](#type-credentials) are verified with the database. |
-| Function [`spacetimedb_sdk::identity::remove_on_connect`](#function-remove_on_connect) | Cancel an `on_connect` or `once_on_connect` callback. |
-| Function [`spacetimedb_sdk::identity::load_credentials`](#function-load_credentials) | Load a saved [`Credentials`](#type-credentials) from a file. |
-| Function [`spacetimedb_sdk::identity::save_credentials`](#function-save_credentials) | Save a [`Credentials`](#type-credentials) to a file. |
-| Type [`module_bindings::{TABLE}`](#type-table) | Autogenerated `struct` type for a table, holding one row. |
-| Method [`module_bindings::{TABLE}::filter_by_{COLUMN}`](#method-filter_by_column) | Autogenerated method to iterate over subscribed rows where a column matches a value. |
-| Method [`module_bindings::{TABLE}::find_by_{COLUMN}`](#method-find_by_column) | Autogenerated method to seek a subscribed row where a unique column matches a value. |
-| Trait [`spacetimedb_sdk::table::TableType`](#trait-tabletype) | Automatically implemented for all tables defined by a module. |
-| Method [`spacetimedb_sdk::table::TableType::count`](#method-count) | Count the number of subscribed rows in a table. |
-| Method [`spacetimedb_sdk::table::TableType::iter`](#method-iter) | Iterate over all subscribed rows. |
-| Method [`spacetimedb_sdk::table::TableType::filter`](#method-filter) | Iterate over a subset of subscribed rows matching a predicate. |
-| Method [`spacetimedb_sdk::table::TableType::find`](#method-find) | Return one subscribed row matching a predicate. |
-| Method [`spacetimedb_sdk::table::TableType::on_insert`](#method-on_insert) | Register a `FnMut` callback to run whenever a new subscribed row is inserted. |
-| Method [`spacetimedb_sdk::table::TableType::remove_on_insert`](#method-remove_on_insert) | Cancel an `on_insert` callback. |
-| Method [`spacetimedb_sdk::table::TableType::on_delete`](#method-on_delete) | Register a `FnMut` callback to run whenever a subscribed row is deleted. |
-| Method [`spacetimedb_sdk::table::TableType::remove_on_delete`](#method-remove_on_delete) | Cancel an `on_delete` callback. |
-| Trait [`spacetimedb_sdk::table::TableWithPrimaryKey`](#trait-tablewithprimarykey) | Automatically implemented for tables with a column designated `#[primarykey]`. |
-| Method [`spacetimedb_sdk::table::TableWithPrimaryKey::on_update`](#method-on_update) | Register a `FnMut` callback to run whenever an existing subscribed row is updated. |
-| Method [`spacetimedb_sdk::table::TableWithPrimaryKey::remove_on_update`](#method-remove_on_update) | Cancel an `on_update` callback. |
-| Type [`module_bindings::ReducerEvent`](#type-reducerevent) | Autogenerated enum with a variant for each reducer defined by the module. |
-| Type [`module_bindings::{REDUCER}Args`](#type-reducerargs) | Autogenerated `struct` type for a reducer, holding its arguments. |
-| Function [`module_bindings::{REDUCER}`](#function-reducer) | Autogenerated function to invoke a reducer. |
-| Function [`module_bindings::on_{REDUCER}`](#function-on_reducer) | Autogenerated function to register a `FnMut` callback to run whenever the reducer is invoked. |
-| Function [`module_bindings::once_on_{REDUCER}`](#function-once_on_reducer) | Autogenerated function to register a `FnOnce` callback to run the next time the reducer is invoked. |
-| Function [`module_bindings::remove_on_{REDUCER}`](#function-remove_on_reducer) | Autogenerated function to cancel an `on_{REDUCER}` or `once_on_{REDUCER}` callback. |
-| Type [`spacetimedb_sdk::reducer::Status`](#type-status) | Enum representing reducer completion statuses. |
+| Definition | Description |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| Function [`module_bindings::connect`](#connect-to-a-database-function-connect) | Autogenerated function to connect to a database. |
+| Function [`spacetimedb_sdk::disconnect`](#connect-to-a-database-function-disconnect) | Close the active connection. |
+| Function [`spacetimedb_sdk::on_disconnect`](#connect-to-a-database-function-on-disconnect) | Register a `FnMut` callback to run when a connection ends. |
+| Function [`spacetimedb_sdk::once_on_disconnect`](#connect-to-a-database-function-once-on-disconnect) | Register a `FnOnce` callback to run the next time a connection ends. |
+| Function [`spacetimedb_sdk::remove_on_disconnect`](#connect-to-a-database-function-remove-on-disconnect) | Cancel an `on_disconnect` or `once_on_disconnect` callback. |
+| Function [`spacetimedb_sdk::subscribe`](#subscribe-to-queries-function-subscribe) | Subscribe to queries with a `&[&str]`. |
+| Function [`spacetimedb_sdk::subscribe_owned`](#subscribe-to-queries-function-subscribe-owned) | Subscribe to queries with a `Vec`. |
+| Function [`spacetimedb_sdk::on_subscription_applied`](#subscribe-to-queries-function-on-subscription-applied) | Register a `FnMut` callback to run when a subscription's initial rows become available. |
+| Function [`spacetimedb_sdk::once_on_subscription_applied`](#subscribe-to-queries-function-once-on-subscription-applied) | Register a `FnOnce` callback to run the next time a subscription's initial rows become available. |
+| Function [`spacetimedb_sdk::remove_on_subscription_applied`](#subscribe-to-queries-function-remove-on-subscription-applied) | Cancel an `on_subscription_applied` or `once_on_subscription_applied` callback. |
+| Type [`spacetimedb_sdk::identity::Identity`](#identify-a-client-type-identity) | A unique public identifier for a client. |
+| Type [`spacetimedb_sdk::identity::Token`](#identify-a-client-type-token) | A private authentication token corresponding to an `Identity`. |
+| Type [`spacetimedb_sdk::identity::Credentials`](#identify-a-client-type-credentials) | An `Identity` paired with its `Token`. |
+| Type [`spacetimedb_sdk::Address`](#identify-a-client-type-address) | An opaque identifier for differentiating connections by the same `Identity`. |
+| Function [`spacetimedb_sdk::identity::identity`](#identify-a-client-function-identity) | Return the current connection's `Identity`. |
+| Function [`spacetimedb_sdk::identity::token`](#identify-a-client-function-token) | Return the current connection's `Token`. |
+| Function [`spacetimedb_sdk::identity::credentials`](#identify-a-client-function-credentials) | Return the current connection's [`Credentials`](#identify-a-client-type-credentials). |
+| Function [`spacetimedb_sdk::identity::address`](#identify-a-client-function-address) | Return the current connection's [`Address`](#identify-a-client-type-address). |
+| Function [`spacetimedb_sdk::identity::on_connect`](#identify-a-client-function-on-connect) | Register a `FnMut` callback to run when the connection's [`Credentials`](#identify-a-client-type-credentials) are verified with the database. |
+| Function [`spacetimedb_sdk::identity::once_on_connect`](#identify-a-client-function-once-on-connect) | Register a `FnOnce` callback to run when the connection's [`Credentials`](#identify-a-client-type-credentials) are verified with the database. |
+| Function [`spacetimedb_sdk::identity::remove_on_connect`](#identify-a-client-function-remove-on-connect) | Cancel an `on_connect` or `once_on_connect` callback. |
+| Function [`spacetimedb_sdk::identity::load_credentials`](#identify-a-client-function-load-credentials) | Load a saved [`Credentials`](#identify-a-client-type-credentials) from a file. |
+| Function [`spacetimedb_sdk::identity::save_credentials`](#identify-a-client-function-save-credentials) | Save a [`Credentials`](#identify-a-client-type-credentials) to a file. |
+| Type [`module_bindings::{TABLE}`](#view-subscribed-rows-of-tables-type-table) | Autogenerated `struct` type for a table, holding one row. |
+| Method [`module_bindings::{TABLE}::filter_by_{COLUMN}`](#view-subscribed-rows-of-tables-method-filter-by-column) | Autogenerated method to iterate over subscribed rows where a column matches a value. |
+| Method [`module_bindings::{TABLE}::find_by_{COLUMN}`](#view-subscribed-rows-of-tables-method-find-by-column) | Autogenerated method to seek a subscribed row where a unique column matches a value. |
+| Trait [`spacetimedb_sdk::table::TableType`](#view-subscribed-rows-of-tables-trait-tabletype) | Automatically implemented for all tables defined by a module. |
+| Method [`spacetimedb_sdk::table::TableType::count`](#view-subscribed-rows-of-tables-trait-tabletype-method-count) | Count the number of subscribed rows in a table. |
+| Method [`spacetimedb_sdk::table::TableType::iter`](#view-subscribed-rows-of-tables-trait-tabletype-method-iter) | Iterate over all subscribed rows. |
+| Method [`spacetimedb_sdk::table::TableType::filter`](#view-subscribed-rows-of-tables-trait-tabletype-method-filter) | Iterate over a subset of subscribed rows matching a predicate. |
+| Method [`spacetimedb_sdk::table::TableType::find`](#view-subscribed-rows-of-tables-trait-tabletype-method-find) | Return one subscribed row matching a predicate. |
+| Method [`spacetimedb_sdk::table::TableType::on_insert`](#view-subscribed-rows-of-tables-trait-tabletype-method-on-insert) | Register a `FnMut` callback to run whenever a new subscribed row is inserted. |
+| Method [`spacetimedb_sdk::table::TableType::remove_on_insert`](#view-subscribed-rows-of-tables-trait-tabletype-method-remove-on-insert) | Cancel an `on_insert` callback. |
+| Method [`spacetimedb_sdk::table::TableType::on_delete`](#view-subscribed-rows-of-tables-trait-tabletype-method-on-delete) | Register a `FnMut` callback to run whenever a subscribed row is deleted. |
+| Method [`spacetimedb_sdk::table::TableType::remove_on_delete`](#view-subscribed-rows-of-tables-trait-tabletype-method-remove-on-delete) | Cancel an `on_delete` callback. |
+| Trait [`spacetimedb_sdk::table::TableWithPrimaryKey`](#view-subscribed-rows-of-tables-trait-tablewithprimarykey) | Automatically implemented for tables with a column designated `#[primarykey]`. |
+| Method [`spacetimedb_sdk::table::TableWithPrimaryKey::on_update`](#view-subscribed-rows-of-tables-trait-tablewithprimarykey-method-on-update) | Register a `FnMut` callback to run whenever an existing subscribed row is updated. |
+| Method [`spacetimedb_sdk::table::TableWithPrimaryKey::remove_on_update`](#view-subscribed-rows-of-tables-trait-tablewithprimarykey-method-remove-on-update) | Cancel an `on_update` callback. |
+| Type [`module_bindings::ReducerEvent`](#observe-and-request-reducer-invocations-type-reducerevent) | Autogenerated enum with a variant for each reducer defined by the module. |
+| Type [`module_bindings::{REDUCER}Args`](#observe-and-request-reducer-invocations-type-reducer-args) | Autogenerated `struct` type for a reducer, holding its arguments. |
+| Function [`module_bindings::{REDUCER}`](#observe-and-request-reducer-invocations-function-reducer) | Autogenerated function to invoke a reducer. |
+| Function [`module_bindings::on_{REDUCER}`](#observe-and-request-reducer-invocations-function-on-reducer) | Autogenerated function to register a `FnMut` callback to run whenever the reducer is invoked. |
+| Function [`module_bindings::once_on_{REDUCER}`](#observe-and-request-reducer-invocations-function-once-on-reducer) | Autogenerated function to register a `FnOnce` callback to run the next time the reducer is invoked. |
+| Function [`module_bindings::remove_on_{REDUCER}`](#observe-and-request-reducer-invocations-function-remove-on-reducer) | Autogenerated function to cancel an `on_{REDUCER}` or `once_on_{REDUCER}` callback. |
+| Type [`spacetimedb_sdk::reducer::Status`](#observe-and-request-reducer-invocations-type-status) | Enum representing reducer completion statuses. |
## Connect to a database
@@ -96,13 +96,13 @@ module_bindings::connect(
Connect to a database named `db_name` accessible over the internet at the URI `spacetimedb_uri`.
-| Argument | Type | Meaning |
-| ----------------- | --------------------- | ------------------------------------------------------------ |
-| `spacetimedb_uri` | `impl TryInto` | URI of the SpacetimeDB instance running the module. |
-| `db_name` | `&str` | Name of the module. |
-| `credentials` | `Option` | [`Credentials`](#type-credentials) to authenticate the user. |
+| Argument | Type | Meaning |
+| ----------------- | --------------------- | ------------------------------------------------------------------------------ |
+| `spacetimedb_uri` | `impl TryInto` | URI of the SpacetimeDB instance running the module. |
+| `db_name` | `&str` | Name of the module. |
+| `credentials` | `Option` | [`Credentials`](#identify-a-client-type-credentials) to authenticate the user. |
-If `credentials` are supplied, they will be passed to the new connection to identify and authenticate the user. Otherwise, a set of [`Credentials`](#type-credentials) will be generated by the server.
+If `credentials` are supplied, they will be passed to the new connection to identify and authenticate the user. Otherwise, a set of [`Credentials`](#identify-a-client-type-credentials) will be generated by the server.
```rust
const MODULE_NAME: &str = "my-module-name";
@@ -158,9 +158,9 @@ Register a callback to be invoked when a connection ends.
| ---------- | ------------------------------- | ------------------------------------------------------ |
| `callback` | `impl FnMut() + Send + 'static` | Callback to be invoked when subscriptions are applied. |
-The callback will be invoked after calling [`disconnect`](#function-disconnect), or when a connection is closed by the server.
+The callback will be invoked after calling [`disconnect`](#connect-to-a-database-function-disconnect), or when a connection is closed by the server.
-The returned `DisconnectCallbackId` can be passed to [`remove_on_disconnect`](#function-remove_on_disconnect) to unregister the callback.
+The returned `DisconnectCallbackId` can be passed to [`remove_on_disconnect`](#connect-to-a-database-function-remove-on-disconnect) to unregister the callback.
```rust
on_disconnect(|| println!("Disconnected!"));
@@ -187,11 +187,11 @@ Register a callback to be invoked the next time a connection ends.
| ---------- | ------------------------------- | ------------------------------------------------------ |
| `callback` | `impl FnMut() + Send + 'static` | Callback to be invoked when subscriptions are applied. |
-The callback will be invoked after calling [`disconnect`](#function-disconnect), or when a connection is closed by the server.
+The callback will be invoked after calling [`disconnect`](#connect-to-a-database-function-disconnect), or when a connection is closed by the server.
The callback will be unregistered after running.
-The returned `DisconnectCallbackId` can be passed to [`remove_on_disconnect`](#function-remove_on_disconnect) to unregister the callback.
+The returned `DisconnectCallbackId` can be passed to [`remove_on_disconnect`](#connect-to-a-database-function-remove-on-disconnect) to unregister the callback.
```rust
once_on_disconnect(|| println!("Disconnected!"));
@@ -219,7 +219,7 @@ spacetimedb_sdk::remove_on_disconnect(
)
```
-Unregister a previously-registered [`on_disconnect`](#function-on_disconnect) callback.
+Unregister a previously-registered [`on_disconnect`](#connect-to-a-database-function-on-disconnect) callback.
| Argument | Type | Meaning |
| -------- | ---------------------- | ------------------------------------------ |
@@ -253,11 +253,11 @@ Subscribe to a set of queries, to be notified when rows which match those querie
The `queries` should be a slice of strings representing SQL queries.
-`subscribe` will return an error if called before establishing a connection with the autogenerated [`connect`](#function-connect) function. In that case, the queries are not registered.
+`subscribe` will return an error if called before establishing a connection with the autogenerated [`connect`](#connect-to-a-database-function-connect) function. In that case, the queries are not registered.
-`subscribe` does not return data directly. The SDK will generate types [`module_bindings::{TABLE}`](#type-table) corresponding to each of the tables in your module. These types implement the trait [`spacetimedb_sdk::table_type::TableType`](#trait-tabletype), which contains methods such as [`TableType::on_insert`](#method-on_insert). Use these methods to receive data from the queries you subscribe to.
+`subscribe` does not return data directly. The SDK will generate types [`module_bindings::{TABLE}`](#view-subscribed-rows-of-tables-type-table) corresponding to each of the tables in your module. These types implement the trait [`spacetimedb_sdk::table_type::TableType`](#view-subscribed-rows-of-tables-trait-tabletype), which contains methods such as [`TableType::on_insert`](#view-subscribed-rows-of-tables-trait-tabletype-method-on-insert). Use these methods to receive data from the queries you subscribe to.
-A new call to `subscribe` (or [`subscribe_owned`](#function-subscribe_owned)) will remove all previous subscriptions and replace them with the new `queries`. If any rows matched the previous subscribed queries but do not match the new queries, those rows will be removed from the client cache, and [`TableType::on_delete`](#method-on_delete) callbacks will be invoked for them.
+A new call to `subscribe` (or [`subscribe_owned`](#subscribe-to-queries-function-subscribe-owned)) will remove all previous subscriptions and replace them with the new `queries`. If any rows matched the previous subscribed queries but do not match the new queries, those rows will be removed from the client cache, and [`TableType::on_delete`](#view-subscribed-rows-of-tables-trait-tabletype-method-on-delete) callbacks will be invoked for them.
```rust
subscribe(&["SELECT * FROM User;", "SELECT * FROM Message;"])
@@ -278,10 +278,10 @@ Subscribe to a set of queries, to be notified when rows which match those querie
The `queries` should be a `Vec` of `String`s representing SQL queries.
-A new call to `subscribe_owned` (or [`subscribe`](#function-subscribe)) will remove all previous subscriptions and replace them with the new `queries`.
-If any rows matched the previous subscribed queries but do not match the new queries, those rows will be removed from the client cache, and [`TableType::on_delete`](#method-on_delete) callbacks will be invoked for them.
+A new call to `subscribe_owned` (or [`subscribe`](#subscribe-to-queries-function-subscribe)) will remove all previous subscriptions and replace them with the new `queries`.
+If any rows matched the previous subscribed queries but do not match the new queries, those rows will be removed from the client cache, and [`TableType::on_delete`](#view-subscribed-rows-of-tables-trait-tabletype-method-on-delete) callbacks will be invoked for them.
-`subscribe_owned` will return an error if called before establishing a connection with the autogenerated [`connect`](#function-connect) function. In that case, the queries are not registered.
+`subscribe_owned` will return an error if called before establishing a connection with the autogenerated [`connect`](#connect-to-a-database-function-connect) function. In that case, the queries are not registered.
```rust
let query = format!("SELECT * FROM User WHERE name = '{}';", compute_my_name());
@@ -304,9 +304,9 @@ Register a callback to be invoked the first time a subscription's matching rows
| ---------- | ------------------------------- | ------------------------------------------------------ |
| `callback` | `impl FnMut() + Send + 'static` | Callback to be invoked when subscriptions are applied. |
-The callback will be invoked after a successful [`subscribe`](#function-subscribe) or [`subscribe_owned`](#function-subscribe_owned) call when the initial set of matching rows becomes available.
+The callback will be invoked after a successful [`subscribe`](#subscribe-to-queries-function-subscribe) or [`subscribe_owned`](#subscribe-to-queries-function-subscribe-owned) call when the initial set of matching rows becomes available.
-The returned `SubscriptionCallbackId` can be passed to [`remove_on_subscription_applied`](#function-remove_on_subscription_applied) to unregister the callback.
+The returned `SubscriptionCallbackId` can be passed to [`remove_on_subscription_applied`](#subscribe-to-queries-function-remove-on-subscription-applied) to unregister the callback.
```rust
on_subscription_applied(|| println!("Subscription applied!"));
@@ -338,11 +338,11 @@ Register a callback to be invoked the next time a subscription's matching rows b
| ---------- | ------------------------------- | ------------------------------------------------------ |
| `callback` | `impl FnMut() + Send + 'static` | Callback to be invoked when subscriptions are applied. |
-The callback will be invoked after a successful [`subscribe`](#function-subscribe) or [`subscribe_owned`](#function-subscribe_owned) call when the initial set of matching rows becomes available.
+The callback will be invoked after a successful [`subscribe`](#subscribe-to-queries-function-subscribe) or [`subscribe_owned`](#subscribe-to-queries-function-subscribe-owned) call when the initial set of matching rows becomes available.
The callback will be unregistered after running.
-The returned `SubscriptionCallbackId` can be passed to [`remove_on_subscription_applied`](#function-remove_on_subscription_applied) to unregister the callback.
+The returned `SubscriptionCallbackId` can be passed to [`remove_on_subscription_applied`](#subscribe-to-queries-function-remove-on-subscription-applied) to unregister the callback.
```rust
once_on_subscription_applied(|| println!("Subscription applied!"));
@@ -368,7 +368,7 @@ spacetimedb_sdk::remove_on_subscription_applied(
)
```
-Unregister a previously-registered [`on_subscription_applied`](#function-on_subscription_applied) callback.
+Unregister a previously-registered [`on_subscription_applied`](#subscribe-to-queries-function-on-subscription-applied) callback.
| Argument | Type | Meaning |
| -------- | ------------------------ | ------------------------------------------ |
@@ -420,10 +420,10 @@ spacetimedb_sdk::identity::Credentials
Credentials, including a private access token, sufficient to authenticate a client connected to a database.
-| Field | Type |
-| ---------- | ---------------------------- |
-| `identity` | [`Identity`](#type-identity) |
-| `token` | [`Token`](#type-token) |
+| Field | Type |
+| ---------- | ---------------------------------------------- |
+| `identity` | [`Identity`](#identify-a-client-type-identity) |
+| `token` | [`Token`](#identify-a-client-type-token) |
### Type `Address`
@@ -431,7 +431,7 @@ Credentials, including a private access token, sufficient to authenticate a clie
spacetimedb_sdk::Address
```
-An opaque identifier for a client connection to a database, intended to differentiate between connections from the same [`Identity`](#type-identity).
+An opaque identifier for a client connection to a database, intended to differentiate between connections from the same [`Identity`](#identify-a-client-type-identity).
### Function `identity`
@@ -439,11 +439,11 @@ An opaque identifier for a client connection to a database, intended to differen
spacetimedb_sdk::identity::identity() -> Result
```
-Read the current connection's public [`Identity`](#type-identity).
+Read the current connection's public [`Identity`](#identify-a-client-type-identity).
Returns an error if:
-- [`connect`](#function-connect) has not yet been called.
+- [`connect`](#connect-to-a-database-function-connect) has not yet been called.
- We connected anonymously, and we have not yet received our credentials.
```rust
@@ -463,11 +463,11 @@ println!("My identity is {:?}", identity());
spacetimedb_sdk::identity::token() -> Result
```
-Read the current connection's private [`Token`](#type-token).
+Read the current connection's private [`Token`](#identify-a-client-type-token).
Returns an error if:
-- [`connect`](#function-connect) has not yet been called.
+- [`connect`](#connect-to-a-database-function-connect) has not yet been called.
- We connected anonymously, and we have not yet received our credentials.
```rust
@@ -487,11 +487,11 @@ println!("My token is {:?}", token());
spacetimedb_sdk::identity::credentials() -> Result
```
-Read the current connection's [`Credentials`](#type-credentials), including a public [`Identity`](#type-identity) and a private [`Token`](#type-token).
+Read the current connection's [`Credentials`](#identify-a-client-type-credentials), including a public [`Identity`](#identify-a-client-type-identity) and a private [`Token`](#identify-a-client-type-token).
Returns an error if:
-- [`connect`](#function-connect) has not yet been called.
+- [`connect`](#connect-to-a-database-function-connect) has not yet been called.
- We connected anonymously, and we have not yet received our credentials.
```rust
@@ -514,9 +514,9 @@ println!("My credentials are {:?}", credentials());
spacetimedb_sdk::identity::address() -> Result
```
-Read the current connection's [`Address`](#type-address).
+Read the current connection's [`Address`](#identify-a-client-type-address).
-Returns an error if [`connect`](#function-connect) has not yet been called.
+Returns an error if [`connect`](#connect-to-a-database-function-connect) has not yet been called.
```rust
connect(SPACETIMEDB_URI, DB_NAME, None)
@@ -541,11 +541,11 @@ Register a callback to be invoked upon authentication with the database.
| ---------- | -------------------------------------------------- | ------------------------------------------------------ |
| `callback` | `impl FnMut(&Credentials, Address) + Send + 'sync` | Callback to be invoked upon successful authentication. |
-The callback will be invoked with the [`Credentials`](#type-credentials) and [`Address`](#type-address) provided by the database to identify this connection. If [`Credentials`](#type-credentials) were supplied to [`connect`](#function-connect), those passed to the callback will be equivalent to the ones used to connect. If the initial connection was anonymous, a new set of [`Credentials`](#type-credentials) will be generated by the database to identify this user.
+The callback will be invoked with the [`Credentials`](#identify-a-client-type-credentials) and [`Address`](#identify-a-client-type-address) provided by the database to identify this connection. If [`Credentials`](#identify-a-client-type-credentials) were supplied to [`connect`](#connect-to-a-database-function-connect), those passed to the callback will be equivalent to the ones used to connect. If the initial connection was anonymous, a new set of [`Credentials`](#identify-a-client-type-credentials) will be generated by the database to identify this user.
-The [`Credentials`](#type-credentials) passed to the callback can be saved and used to authenticate the same user in future connections.
+The [`Credentials`](#identify-a-client-type-credentials) passed to the callback can be saved and used to authenticate the same user in future connections.
-The returned `ConnectCallbackId` can be passed to [`remove_on_connect`](#function-remove_on_connect) to unregister the callback.
+The returned `ConnectCallbackId` can be passed to [`remove_on_connect`](#identify-a-client-function-remove-on-connect) to unregister the callback.
```rust
on_connect(
@@ -576,13 +576,13 @@ Register a callback to be invoked once upon authentication with the database.
| ---------- | --------------------------------------------------- | ---------------------------------------------------------------- |
| `callback` | `impl FnOnce(&Credentials, Address) + Send + 'sync` | Callback to be invoked once upon next successful authentication. |
-The callback will be invoked with the [`Credentials`](#type-credentials) and [`Address`](#type-address) provided by the database to identify this connection. If [`Credentials`](#type-credentials) were supplied to [`connect`](#function-connect), those passed to the callback will be equivalent to the ones used to connect. If the initial connection was anonymous, a new set of [`Credentials`](#type-credentials) will be generated by the database to identify this user.
+The callback will be invoked with the [`Credentials`](#identify-a-client-type-credentials) and [`Address`](#identify-a-client-type-address) provided by the database to identify this connection. If [`Credentials`](#identify-a-client-type-credentials) were supplied to [`connect`](#connect-to-a-database-function-connect), those passed to the callback will be equivalent to the ones used to connect. If the initial connection was anonymous, a new set of [`Credentials`](#identify-a-client-type-credentials) will be generated by the database to identify this user.
-The [`Credentials`](#type-credentials) passed to the callback can be saved and used to authenticate the same user in future connections.
+The [`Credentials`](#identify-a-client-type-credentials) passed to the callback can be saved and used to authenticate the same user in future connections.
The callback will be unregistered after running.
-The returned `ConnectCallbackId` can be passed to [`remove_on_connect`](#function-remove_on_connect) to unregister the callback.
+The returned `ConnectCallbackId` can be passed to [`remove_on_connect`](#identify-a-client-function-remove-on-connect) to unregister the callback.
### Function `remove_on_connect`
@@ -590,7 +590,7 @@ The returned `ConnectCallbackId` can be passed to [`remove_on_connect`](#functio
spacetimedb_sdk::identity::remove_on_connect(id: ConnectCallbackId)
```
-Unregister a previously-registered [`on_connect`](#function-on_connect) or [`once_on_connect`](#function-once_on_connect) callback.
+Unregister a previously-registered [`on_connect`](#identify-a-client-function-on-connect) or [`once_on_connect`](#identify-a-client-function-once-on-connect) callback.
| Argument | Type | Meaning |
| -------- | ------------------- | ------------------------------------------ |
@@ -619,15 +619,15 @@ spacetimedb_sdk::identity::load_credentials(
) -> Result