Expand description
Core types and abstractions for the Toasty ORM.
This crate provides the shared foundation used by all Toasty components:
Schema– the combined app-level, database-level, and mapping schemastmt– the statement AST used to represent queries and mutationsdriver– the trait interface that database drivers implementError/Result– unified error handling
Most users interact with the higher-level toasty crate. This crate is
relevant when writing database drivers or working with schema internals.
§Examples
ⓘ
use toasty_core::{Schema, Error, Result};
fn check_schema(schema: &Schema) -> Result<()> {
println!("models: {}", schema.app.models.len());
Ok(())
}Re-exports§
pub use driver::Connection;pub use schema::Schema;
Modules§
- driver
- Database driver traits and capability descriptions. Database driver interface for Toasty.
- schema
- Schema definitions spanning the app layer, database layer, and the mapping between them. Schema representation for Toasty, split into three layers.
- stmt
- Statement AST types for representing queries, inserts, updates, and deletes. Statement AST types for Toasty’s query compilation pipeline.
Macros§
- path
- Constructs a
stmt::Pathfrom a dot-separated sequence of field step expressions.
Structs§
- Error
- The error type returned by Toasty operations. The error type used throughout Toasty.