pub trait ModuleInit:
Debug
+ Clone
+ Send
+ Sync
+ 'static {
type Common: CommonModuleInit;
const DATABASE_VERSION: DatabaseVersion;
// Required method
fn dump_database(
&self,
dbtx: &mut DatabaseTransaction<'_>,
prefix_names: Vec<String>,
) -> impl Future<Output = Box<dyn Iterator<Item = (String, Box<dyn Serialize + Send>)> + '_>> + Send;
}
Expand description
Trait implemented by every *ModuleInit
(server or client side)
Required Associated Constants§
sourceconst DATABASE_VERSION: DatabaseVersion
const DATABASE_VERSION: DatabaseVersion
This represents the module’s database version that the current code is
compatible with. It is important to increment this value whenever a
key or a value that is persisted to the database within the module
changes. It is also important to add the corresponding
migration function in get_database_migrations
which should define how
to move from the previous database version to the current version.
Required Associated Types§
type Common: CommonModuleInit
Required Methods§
fn dump_database( &self, dbtx: &mut DatabaseTransaction<'_>, prefix_names: Vec<String>, ) -> impl Future<Output = Box<dyn Iterator<Item = (String, Box<dyn Serialize + Send>)> + '_>> + Send
Object Safety§
This trait is not object safe.