Crate spacetimedb
source ·Expand description
Provides safe abstractions around bindings-sys
and re-exports #[spacetimedb] and #[duration].
Re-exports§
pub use log;pub use rand;pub use spacetimedb_bindings_sys as sys;pub use spacetimedb_lib;pub use spacetimedb_lib::sats;
Modules§
Macros§
- Functions like the standard library’s
dbg!macro but prints as aDEBUGmessage to the console. - Implements query!(|row| …) macro for filtering rows.
Structs§
- This is the address for a SpacetimeDB database or client connection.
- An erased reducer.
- Error values used in the safe bindings API.
- Describe a named index with an index type over a set of columns identified by their IDs.
- A context that any reducer is provided with.
- A reference to the random number generator for this reducer call.
- A table iterator which yields values of the
TableTypecorresponding to the table. - A timestamp measured as micro seconds since the UNIX epoch.
- A UNIQUE constraint violation on table type
Twas attempted.
Enums§
- A value in SATS typed at some
AlgebraicType.
Traits§
- A datastructure that can be deserialized from any data format supported by SATS.
- A data structure that can be deserialized in SATS without borrowing any data from the deserializer.
- A trait for types that can be serialized and tested for equality.
- A data structure that can be serialized into any data format supported by SATS.
- A trait for types that can be represented as an
AlgebraicTypeprovided a typing contexttypespace. - A trait for the set of types serializable, deserializable, and convertible to
AlgebraicType.
Functions§
- Deletes all rows in the table identified by
table_idwhere the column identified bycol_idmatches avaluethat can be serialized. - Deletes those rows, in the table identified by
table_id, that match any row inrelation. - Queries and returns the
table_idassociated with the given (table)name. - Insert a row of type
Tinto the table identified bytable_id. - Finds all rows in the table identified by
table_id, where the row has a column, identified bycol_id, with data matchingvalthat can be serialized. - Generates a random value.
- Retrieve the random number generator for this reducer transaction, seeded by the timestamp of the reducer call.
Type Aliases§
Attribute Macros§
- Defines the
#[spacetimedb(input)]procedural attribute.
Derive Macros§
- Generates code for treating this type as a table.