-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathlib.rs
More file actions
76 lines (68 loc) · 3.07 KB
/
lib.rs
File metadata and controls
76 lines (68 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! The SpacetimeDB Rust client SDK, which enables native Rust applications
//! to communicate with SpacetimeDB modules.
//!
//! This library depends on a set of module-specific definitions
//! autogenerated by [the SpacetimeDB CLI](https://spacetimedb.com/install).
//! See [the SpacetimeDB Rust client SDK reference](https://spacetimedb.com/docs/sdks/rust#generate-module-bindings)
//! for more oh how to generate these bindings.
// Any `#[doc(hidden)]` modules or uses are public because
// code generated by the CLI's codegen references them,
// but users should not.
mod callbacks;
mod client_cache;
mod compression;
mod db_connection;
mod metrics;
mod spacetime_module;
mod subscription;
mod websocket;
pub mod credentials;
pub mod db_context;
pub mod error;
pub mod event;
pub mod table;
pub use db_connection::DbConnectionBuilder;
pub use db_context::DbContext;
pub use error::{Error, Result};
pub use event::{Event, ReducerEvent, Status};
pub use table::{EventTable, Table, TableLike, TableWithPrimaryKey, WithDelete, WithInsert, WithUpdate};
pub use spacetime_module::SubscriptionHandle;
pub use spacetimedb_client_api_messages::websocket::v1::Compression;
pub use spacetimedb_lib::{ConnectionId, Identity, ScheduleAt, TimeDuration, Timestamp, Uuid};
pub use spacetimedb_sats::{i256, u256};
#[doc(hidden)]
pub mod __codegen {
//! Names and definitions referenced by the CLI's codegen.
//!
//! Necessarily public, but should not be considered part of this library's public interface.
//! These may change incompatibly without a major version bump.
pub use http;
pub use log;
pub use spacetimedb_client_api_messages::websocket as __ws;
pub use spacetimedb_lib as __lib;
pub use spacetimedb_query_builder as __query_builder;
pub use spacetimedb_sats as __sats;
pub use crate::callbacks::{CallbackId, DbCallbacks};
pub use crate::client_cache::{ClientCache, TableAppliedDiff, TableHandle, UniqueConstraintHandle};
pub use crate::db_connection::DbContextImpl;
pub use crate::error::{Error, InternalError, Result};
pub use crate::spacetime_module::{
parse_row_list_as_deletes, parse_row_list_as_inserts, transaction_update_iter_table_updates,
AbstractEventContext, AppliedDiff, DbConnection, DbUpdate, ErrorContext, EventContext, InModule,
ProcedureEventContext, QueryBuilder, QueryTableAccessor, Reducer, ReducerEventContext, SpacetimeModule,
SubscriptionEventContext, SubscriptionHandle, TableUpdate,
};
pub use crate::subscription::{OnEndedCallback, SubscriptionBuilder, SubscriptionHandleImpl};
pub use crate::{
ConnectionId, DbConnectionBuilder, DbContext, Event, EventTable, Identity, ReducerEvent, ScheduleAt, Table,
TableLike, TableWithPrimaryKey, TimeDuration, Timestamp, Uuid, WithDelete, WithInsert, WithUpdate,
};
}
#[doc(hidden)]
pub mod unstable {
//! Unstable interfaces not ready for the prime time.
//!
//! These may change incompatibly without a major version bump.
pub use crate::db_connection::set_connection_id;
pub use crate::metrics::{ClientMetrics, CLIENT_METRICS};
}