pub trait IDynCommonModuleInit: Debug {
// Required methods
fn decoder(&self) -> Decoder;
fn module_kind(&self) -> ModuleKind;
fn to_dyn_common(&self) -> DynCommonModuleInit;
fn dump_database<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
prefix_names: Vec<String>,
) -> Pin<Box<dyn Future<Output = Box<dyn Iterator<Item = (String, Box<dyn Serialize + Send>)> + '_>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Operations common to Server and Client side module gen dyn newtypes
Due to conflict of impl Trait for T
for both ServerModuleInit
and
ClientModuleInit
, we can’t really have a ICommonModuleInit
, so to unify
them in ModuleInitRegistry
we move the common functionality to be an
interface over their dyn newtype wrappers. A bit weird, but works.