Trait pliantdb_core::schema::Schema[][src]

pub trait Schema: Send + Sync + Debug + 'static {
    fn schema_id() -> Id;
fn define_collections(schema: &mut Schematic); #[must_use] fn schematic() -> Schematic { ... } }

Defines a group of collections that are stored into a single database.

Required methods

fn schema_id() -> Id[src]

Returns the unique Id for this schema.

fn define_collections(schema: &mut Schematic)[src]

Defines the Collections into schema.

Loading content...

Provided methods

#[must_use]fn schematic() -> Schematic[src]

Retrieves the Schematic for this schema.

Loading content...

Implementations on Foreign Types

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.

Loading content...

Implementors

impl<T> Schema for T where
    T: Collection + 'static, 
[src]

Loading content...