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::QueryDiagnosticCategory;pub use error::QueryDiagnosticPathKind;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 migration::MigrationApprovalBuilder;pub use migration::MigrationApprovalSet;pub use migration::MigrationCatalog;pub use migration::MigrationHistoryEntry;pub use migration::MigrationPlan;pub use migration::MigrationPreview;pub use migration::MigrationPreviewEntry;pub use schema::Schema;pub use schema::SchemaPackage;pub use schema::Unbound;pub use session::ConnectionOptions;pub use session::Database;pub use session::DatabaseCreateOutcome;pub use session::DatabaseDeleteOutcome;pub use session::ManagedDatabaseDeleteOutcome;pub use session::ManagedDatabaseDeletionPlan;pub use session::ManagedDatabasePairState;
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.
- migration
- Generated-package-owned immutable migration catalog inspection.
- 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§
- Answer
Cancellation - Cloneable cooperative cancellation signal checked between provider items and used to wake in-flight provider awaits.
- 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.
- Canonical
Codec Limits - Tighten-only structural and byte ceilings for canonical codec work.
- Canonical
Codec Options - One owned cancellation/deadline/limit policy captured for a codec invocation.
- Collected
- One typed collection selection used inside a distinct-root page shape.
- Direct
Connection Policy - Immutable generated-package direct connection policy.
- Direct
Tls - Closed TLS policy for one generated-package direct connection.
- 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.
- Migration
Backfill Observation - Bounded terminal observation for one canonical backfill operation.
- Migration
Cancellation - Cloneable, wakeable cancellation authority for migration operations.
- Migration
Execution Control - Immutable controls shared by apply and rollback execution.
- Migration
Execution Report - Bounded owned projection of one terminal apply or rollback outcome.
- Migration
Execution Resource Limits - Tighten-only bounded resources for one migration execution invocation.
- Migration
Verify Report - The complete read-only verification report.
- 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.
- Projected
Entity Filter - Immutable canonical filter for one exact generated entity model.
- Projected
Relation Filter - Immutable canonical filter for one exact generated relation model.
- Query
- One persistent, reusable singular-shape query lineage.
- Query
Execution Deadline - One absolute monotonic deadline shared by every stage of one query terminal.
- Query
Execution Resource Limits - One common tighten-only policy for generated queries in every binding.
- Query
Session - One isolated owner-branded query authoring session.
- Read
Entity Manager - Borrowed read-only manager for one exact generated entity model.
- Read
Relation Manager - Borrowed read-only manager for one exact generated relation model.
- 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.
Enums§
- Migration
Drift Finding - One verified drift finding.
- Migration
Execution Direction - Direction of one bounded public migration execution report.
- Migration
Execution Report Position - Stable position vocabulary shared by forward and rollback reports.
- Migration
Execution Status - Terminal status of one bounded public migration execution report.
- Projected
Manager Comparison - One closed scalar comparison admitted by an exact generated-manager filter.
Constants§
- MAX_
MIGRATION_ BACKFILL_ OBSERVATIONS - Shared maximum number of retained terminal backfill observations.
- MAX_
MIGRATION_ EXECUTION_ GROUPS - Shared maximum number of migration transaction groups in one invocation.
- MAX_
QUERY_ ATTRIBUTE_ VALUES - Canonical maximum hydrated/projected attribute-value count.
- MAX_
QUERY_ BYTES - Canonical maximum provider, reply, and projected payload bytes.
- MAX_
QUERY_ COLLECTION_ MEMBERS - Canonical maximum collection members, including reduction cells.
- MAX_
QUERY_ GRAPH_ NODES - Canonical maximum hydrated/projected graph-node count.
- MAX_
QUERY_ ITEMS - Canonical maximum provider/result item count.
- MAX_
QUERY_ ROLE_ PLAYERS - Canonical maximum relation-role-player references.
- MAX_
QUERY_ STATEMENTS - Canonical maximum provider statements per terminal.
- MAX_
QUERY_ TIMEOUT_ MILLISECONDS - Canonical maximum generated-query execution duration in milliseconds.
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.