Crate spacetimedb_bindings_sys

Crate spacetimedb_bindings_sys 

Source
Expand description

Defines sys calls to interact with SpacetimeDB. This forms an ABI of sorts that modules written in Rust can use.

Modules§

raw
Provides a raw set of sys calls which abstractions can be built atop of.

Structs§

Errno
Error values used in the safe bindings API.
RowIter

Enums§

LogLevel
A log level that can be used in console_log. The variants are convertible into a raw u8 log level.

Functions§

console_log
Log at level a text message occurring in filename:line_number with target being the module path at the log! invocation site.
datastore_delete_all_by_eq_bsatn
Deletes those rows, in the table identified by table_id, that match any row in the byte string relation.
datastore_delete_by_index_scan_point_bsatn
Deletes all rows found in the index identified by index_id, according to the `point.
datastore_delete_by_index_scan_range_bsatn
Deletes all rows found in the index identified by index_id, according to the prefix, rstart, and rend.
datastore_index_scan_point_bsatn
Finds all rows in the index identified by index_id, according to the `point.
datastore_index_scan_range_bsatn
Finds all rows in the index identified by index_id, according to the prefix, rstart, and rend.
datastore_insert_bsatn
Inserts a row into the table identified by table_id, where the row is a BSATN-encoded ProductValue matching the table’s ProductType row-schema.
datastore_table_row_count
Returns the number of rows currently in table identified by table_id.
datastore_table_scan_bsatn
Starts iteration on each row, as BSATN-encoded, of a table identified by table_id. Returns iterator handle is written to the out pointer. This handle can be advanced by RowIter::read.
datastore_update_bsatn
Updates a row into the table identified by table_id, where the row is a BSATN-encoded ProductValue matching the table’s ProductType row-schema.
get_jwt
Finds the JWT payload associated with connection_id. If nothing is found for the connection, this returns None. If a payload is found, this will return a valid raw::BytesSource.
identity
Read the current module’s identity, as a little-endian byte array.
index_id_from_name
Queries the index_id associated with the given (index) name.
table_id_from_name
Queries the table_id associated with the given (table) name.

Type Aliases§

Result