Skip to main content

background_task_component_with_definitions

Function background_task_component_with_definitions 

Source
pub fn background_task_component_with_definitions<Kind, PresentationCode>(
    background_tasks: BackgroundTasks,
    definitions: &'static [RuntimeTaskDefinition<Kind, PresentationCode>],
) -> RuntimeComponentBundleRegistration<BackgroundTaskRuntimeDefinitionsComponent<Kind, PresentationCode>>
where Kind: Sync + 'static, PresentationCode: Sync + 'static,
Expand description

Creates the background task runtime component with product task definitions.

This is the preferred companion for task catalogs generated by crate::runtime_task_registry!. Products keep their enum and presentation code, while Forge registers the runtime task descriptor fields from the shared definition list.