/// Registers a schema for use within the server.
Registers a schema for use within the server.
Registers a schema for use within the server .
pub async fn register_schema<DB: Schema>(&self) -> Result<(), Error> {
        let mut schemas = fast_async_write!(self.data.schemas);
        if schemas
            .insert(
                DB::schema_name()?,
                Box::new(StorageSchemaOpener::<DB>::new()?),
            )
            .is_none()
        {
            Ok(())
        } else {
            Err(Error::Core(bonsaidb_core::Error::SchemaAlreadyRegistered(
                DB::schema_name()?,
            )))
        }
    }
pub async fn register_schema < DB : Schema > ( & self ) -> Result < ( ) , Error > { let mut schemas = fast_async_write ! ( self data schemas ) ; if schemas . insert ( DB :: schema_name ( ) ? , Box :: new ( StorageSchemaOpener :: < DB > :: new ( ) ? ) , ) . is_none ( ) { Ok ( ( ) ) } else { Err ( Error :: Core ( bonsaidb_core :: Error :: SchemaAlreadyRegistered ( DB :: schema_name ( ) ? , ) ) ) } }
Registers a schema for use within the server.
Registers a schema for use within the server .
&self