Crate spacetimedb
source ·Expand description
Provides safe abstractions around bindings-sys
and re-exports #[spacetimedb]
and #[duration]
.
Re-exports§
pub use log;
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 aDEBUG
message 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.
- An identifier for the schedule to call reducer
R
. - A table iterator which yields values of the
TableType
corresponding to the table. - A timestamp measured as micro seconds since the UNIX epoch.
- A UNIQUE constraint violation on table type
T
was 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
AlgebraicType
provided a typing contexttypespace
. - A trait for the set of types serializable, deserializable, and convertible to
AlgebraicType
. - A trait for types that can be converted into primary keys.
Functions§
- Deletes all rows in the table identified by
table_id
where the column identified bycol_id
matches avalue
that can be serialized. - Deletes those rows, in the table identified by
table_id
, that match any row inrelation
. - Queries and returns the
table_id
associated with the given (table)name
. - Insert a row of type
T
into 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 matchingval
that can be serialized.
Type Aliases§
Attribute Macros§
- Defines the
#[spacetimedb(input)]
procedural attribute.
Derive Macros§
- Generates code for treating this type as a table.