Trait pliantdb_local::core::schema::Schema [−][src]
pub trait Schema: 'static + Send + Sync + Debug { pub fn schema_name() -> Result<SchemaName, InvalidNameError>; pub fn define_collections(schema: &mut Schematic) -> Result<(), Error>; pub fn schematic() -> Result<Schematic, Error> { ... } }
Defines a group of collections that are stored into a single database.
Required methods
pub fn schema_name() -> Result<SchemaName, InvalidNameError>
[src]
Returns the unique SchemaName
for this schema.
pub fn define_collections(schema: &mut Schematic) -> Result<(), Error>
[src]
Defines the Collection
s into schema
.
Provided methods
Loading content...Implementations on Foreign Types
impl Schema for ()
[src]
impl Schema for ()
[src]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.
pub fn schema_name() -> Result<SchemaName, InvalidNameError>
[src]
pub fn define_collections(_schema: &mut Schematic) -> Result<(), Error>
[src]
Implementors
impl Schema for BasicSchema
[src]
impl Schema for BasicSchema
[src]pub fn schema_name() -> Result<SchemaName, InvalidNameError>
[src]
pub fn define_collections(schema: &mut Schematic) -> Result<(), Error>
[src]
impl<T> Schema for T where
T: Collection + 'static,
[src]
impl<T> Schema for T where
T: Collection + 'static,
[src]