Skip to main content

Crate type_bridge

Crate type_bridge 

Source
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§

AnswerCancellation
Cloneable cooperative cancellation signal checked between provider items and used to wake in-flight provider awaits.
Binding
One schema/model-branded Copy binding token allocated by a QuerySession. Copying preserves the binding identity; only a fresh session binding call creates a new occurrence.
BoundField
One generated field resolved against one session binding occurrence.
BoundRole
One generated relation role resolved against one relation binding occurrence.
CanonicalCodecLimits
Tighten-only structural and byte ceilings for canonical codec work.
CanonicalCodecOptions
One owned cancellation/deadline/limit policy captured for a codec invocation.
Collected
One typed collection selection used inside a distinct-root page shape.
DirectConnectionPolicy
Immutable generated-package direct connection policy.
DirectTls
Closed TLS policy for one generated-package direct connection.
EntityManager
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.
EntitySubtypeManager
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.
FieldGroupedQuery
One query lineage grouped by a generated owned field value for aggregation.
GroupedQuery
One query lineage grouped by a second attached binding for aggregation.
MigrationBackfillObservation
Bounded terminal observation for one canonical backfill operation.
MigrationCancellation
Cloneable, wakeable cancellation authority for migration operations.
MigrationExecutionControl
Immutable controls shared by apply and rollback execution.
MigrationExecutionReport
Bounded owned projection of one terminal apply or rollback outcome.
MigrationExecutionResourceLimits
Tighten-only bounded resources for one migration execution invocation.
MigrationVerifyReport
The complete read-only verification report.
NamedSelection
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.
PageOptions
Bounded options for one ordered distinct-root page.
Predicate
One schema-branded, composable query predicate.
ProjectedEntityFilter
Immutable canonical filter for one exact generated entity model.
ProjectedRelationFilter
Immutable canonical filter for one exact generated relation model.
Query
One persistent, reusable singular-shape query lineage.
QueryExecutionDeadline
One absolute monotonic deadline shared by every stage of one query terminal.
QueryExecutionResourceLimits
One common tighten-only policy for generated queries in every binding.
QuerySession
One isolated owner-branded query authoring session.
ReadEntityManager
Borrowed read-only manager for one exact generated entity model.
ReadRelationManager
Borrowed read-only manager for one exact generated relation model.
ReadTransaction
One client-owned reusable read transaction over a schema-bound database.
RelationManager
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.
RelationSubtypeManager
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.
RemoteConnectionOptions
Connection-time authority, transport, and limit configuration.
RemoteDatabase
A client-owned remote generated-query database branded by schema S.
RemoteQueryLimits
Explicit immutable budgets for one remote generated-query terminal.
RowsOptions
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.
TransactionEntityManager
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.
TransactionRelationManager
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.
WriteTransaction
One client-owned open write transaction over a schema-bound database.

Enums§

MigrationDriftFinding
One verified drift finding.
MigrationExecutionDirection
Direction of one bounded public migration execution report.
MigrationExecutionReportPosition
Stable position vocabulary shared by forward and rollback reports.
MigrationExecutionStatus
Terminal status of one bounded public migration execution report.
ProjectedManagerComparison
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§

OrderedOperand
Sealed marker for canonically ordered query operands.
QueryOperand
Sealed conversion from client literals and generated value wrappers into canonical query operands.
RemoteQueryTransport
One caller-owned asynchronous transport for the authenticated V2 routes.
Selectable
Sealed resolution from one selected binding to its typed query output.
SelectedShape
Sealed typed selected-output shape accepted by the one query facade.
SelectionMode
Sealed marker for a binding’s exact-versus-subtypes selection behavior.
SingularSelectedShape
Sealed marker for a selected shape containing singular slots only.

Derive Macros§

SelectedRow
Derive a declaration-ordered named selection constructor for the public generated Rust query facade.