Expand description
Public Rust client library for TypeBridge.
Provides top-level Database, ConnectionOptions, SchemaPackage,
and owner-branded schema/model primitives.
Re-exports§
pub use error::Error;pub use error::ErrorCategory;pub use error::ErrorDetail;pub use error::ErrorDiagnostic;pub use error::ErrorPathSegment;pub use error::ModelValidationPhase;pub use error::Result;pub use hooks::CrudOperation;pub use hooks::HookContext;pub use hooks::HookError;pub use hooks::HookFuture;pub use hooks::LifecycleHook;pub use hooks::ModelKind;pub use hooks::PreHookResult;pub use schema::Schema;pub use schema::SchemaPackage;pub use schema::Unbound;pub use session::ConnectionOptions;pub use session::Database;
Modules§
- __
codegen - Generated-code SPI for TypeBridge.
- aggregate
- Typed reduction terms and tuple decoding for the query facade (Flight 3, F3-04b-3).
- error
- Error handling for the public TypeBridge client.
- hooks
- Generated-model CRUD lifecycle hooks.
- model
- Model traits and owner-branded tokens for generated TypeBridge models.
- schema
- Schema package markers and type-branded installation handshake.
- session
- Database session handles and connection options.
- value
- Client-owned canonical query literals (Flight 3, F3-02).
Structs§
- Binding
- One schema/model-branded
Copybinding token allocated by aQuerySession. Copying preserves the binding identity; only a fresh session binding call creates a new occurrence. - Bound
Field - One generated field resolved against one session binding occurrence.
- Bound
Role - One generated relation role resolved against one relation binding occurrence.
- Collected
- One typed collection selection used inside a distinct-root page shape.
- Entity
Manager - Schema-bound, model-branded manager for exact entity operations. Exact reads and writes exclude subtypes; methods return client input/schema-validation, database/transaction/close, or hydration/model-validation errors as applicable.
- Entity
Subtype Manager - Read-only, schema/model-branded manager for an inclusive generated subtype association. Results are the generated associated leaf or closed family type; no writes are exposed. Reads and counts can return input/schema-validation, database/transaction/close, or hydration/model-validation errors.
- Exact
- Exact-match selection: results materialize as the bound concrete model.
- Field
Grouped Query - One query lineage grouped by a generated owned field value for aggregation.
- Grouped
Query - One query lineage grouped by a second attached binding for aggregation.
- Named
Selection - A declaration-ordered named selected shape produced by
SelectedRow. - Order
- One stable public ordering term over a bound field.
- Page
- One immutable owned distinct-root page.
- Page
Options - Bounded options for one ordered distinct-root page.
- Predicate
- One schema-branded, composable query predicate.
- Query
- One persistent, reusable singular-shape query lineage.
- Query
Session - One isolated owner-branded query authoring session.
- Read
Transaction - One client-owned reusable read transaction over a schema-bound database.
- Relation
Manager - Schema-bound, model-branded manager for exact relation operations. Exact reads and writes exclude subtypes; methods return client input/schema-validation, database/transaction/close, or hydration/model-validation errors as applicable.
- Relation
Subtype Manager - Read-only, schema/model-branded manager for an inclusive generated subtype association. Results are the generated associated leaf or closed family type; no writes are exposed. Reads and counts can return input/schema-validation, database/transaction/close, or hydration/model-validation errors.
- Remote
Connection Options - Connection-time authority, transport, and limit configuration.
- Remote
Database - A client-owned remote generated-query database branded by schema
S. - Remote
Query Limits - Explicit immutable budgets for one remote generated-query terminal.
- Rows
Options - Bounded options for one ordered row fetch.
- Subtypes
- Subtype-inclusive selection: results materialize as the generated leaf or closed family associated with the bound root.
- Transaction
Entity Manager - Schema-bound, model-branded exact entity manager borrowing one open client write transaction. Operations reuse the shared open context and never commit, roll back, or close it; errors are returned with the transaction left open for the caller to decide.
- Transaction
Relation Manager - Schema-bound, model-branded exact relation manager borrowing one open client write transaction. Operations reuse the shared open context and never commit, roll back, or close it; errors are returned with the transaction left open for the caller to decide.
- Write
Transaction - One client-owned open write transaction over a schema-bound database.
Traits§
- Ordered
Operand - Sealed marker for canonically ordered query operands.
- Query
Operand - Sealed conversion from client literals and generated value wrappers into canonical query operands.
- Remote
Query Transport - One caller-owned asynchronous transport for the authenticated V2 routes.
- Selectable
- Sealed resolution from one selected binding to its typed query output.
- Selected
Shape - Sealed typed selected-output shape accepted by the one query facade.
- Selection
Mode - Sealed marker for a binding’s exact-versus-subtypes selection behavior.
- Singular
Selected Shape - Sealed marker for a selected shape containing singular slots only.
Derive Macros§
- Selected
Row - Derive a declaration-ordered named selection constructor for the public generated Rust query facade.