pub trait IClientModuleInit:
IDynCommonModuleInit
+ Debug
+ MaybeSend
+ MaybeSync {
// Required methods
fn decoder(&self) -> Decoder;
fn module_kind(&self) -> ModuleKind;
fn as_common(&self) -> &(dyn IDynCommonModuleInit + Send + Sync + 'static);
fn supported_api_versions(&self) -> MultiApiVersion;
fn recover<'life0, 'life1, 'async_trait>(
&'life0 self,
final_client: FinalClient,
federation_id: FederationId,
num_peers: NumPeers,
cfg: ClientModuleConfig,
db: Database,
instance_id: ModuleInstanceId,
core_api_version: ApiVersion,
module_api_version: ApiVersion,
module_root_secret: DerivableSecret,
notifier: Notifier,
api: DynGlobalApi,
admin_auth: Option<ApiAuth>,
snapshot: Option<&'life1 DynModuleBackup>,
progress_tx: Sender<RecoveryProgress>,
task_group: TaskGroup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn init<'life0, 'async_trait>(
&'life0 self,
final_client: FinalClient,
federation_id: FederationId,
peer_num: usize,
cfg: ClientModuleConfig,
db: Database,
instance_id: ModuleInstanceId,
core_api_version: ApiVersion,
module_api_version: ApiVersion,
module_root_secret: DerivableSecret,
notifier: Notifier,
api: DynGlobalApi,
admin_auth: Option<ApiAuth>,
task_group: TaskGroup,
) -> Pin<Box<dyn Future<Output = Result<DynClientModule>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_database_migrations(
&self,
) -> BTreeMap<DatabaseVersion, ClientMigrationFn>;
}
Required Methods§
fn decoder(&self) -> Decoder
fn module_kind(&self) -> ModuleKind
fn as_common(&self) -> &(dyn IDynCommonModuleInit + Send + Sync + 'static)
sourcefn supported_api_versions(&self) -> MultiApiVersion
fn supported_api_versions(&self) -> MultiApiVersion
fn recover<'life0, 'life1, 'async_trait>(
&'life0 self,
final_client: FinalClient,
federation_id: FederationId,
num_peers: NumPeers,
cfg: ClientModuleConfig,
db: Database,
instance_id: ModuleInstanceId,
core_api_version: ApiVersion,
module_api_version: ApiVersion,
module_root_secret: DerivableSecret,
notifier: Notifier,
api: DynGlobalApi,
admin_auth: Option<ApiAuth>,
snapshot: Option<&'life1 DynModuleBackup>,
progress_tx: Sender<RecoveryProgress>,
task_group: TaskGroup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 self,
final_client: FinalClient,
federation_id: FederationId,
peer_num: usize,
cfg: ClientModuleConfig,
db: Database,
instance_id: ModuleInstanceId,
core_api_version: ApiVersion,
module_api_version: ApiVersion,
module_root_secret: DerivableSecret,
notifier: Notifier,
api: DynGlobalApi,
admin_auth: Option<ApiAuth>,
task_group: TaskGroup,
) -> Pin<Box<dyn Future<Output = Result<DynClientModule>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_database_migrations( &self, ) -> BTreeMap<DatabaseVersion, ClientMigrationFn>
Trait Implementations§
source§impl AsRef<dyn IClientModuleInit> for DynClientModuleInit
impl AsRef<dyn IClientModuleInit> for DynClientModuleInit
source§fn as_ref(&self) -> &(dyn IClientModuleInit + 'static)
fn as_ref(&self) -> &(dyn IClientModuleInit + 'static)
Converts this type into a shared reference of the (usually inferred) input type.