Trait pliantdb_local::core::schema::Schema [−][src]
pub trait Schema: 'static + Send + Sync + Debug { fn schema_name() -> Result<SchemaName, InvalidNameError>; fn define_collections(schema: &mut Schematic) -> Result<(), Error>; fn schematic() -> Result<Schematic, Error> { ... } }
Expand description
Defines a group of collections that are stored into a single database.
Required methods
fn schema_name() -> Result<SchemaName, InvalidNameError>
fn schema_name() -> Result<SchemaName, InvalidNameError>
Returns the unique SchemaName
for this schema.
Provided methods
Implementations on Foreign Types
This trait is only useful for tools like pliantdb local-backup
. There is no
real-world use case of connecting to a Database with no schema.