Skip to main content

compose

Function compose 

Source
pub fn compose(
    shell: &ProtocolDescriptor,
    parts: &[ModulePart<'_>],
) -> Result<ProtocolDescriptor, DescriptorError>
Expand description

The application catalog: the shell’s state and commands first, then each module in order. Module query reads name the module’s own fields; in the application they read the module’s state field as a whole.

With optional modules the catalog ends with the modules state field, whose record holds a bool per optional module, and the command modules.set_enabled(id, enabled), which returns the ids of the modules it switched, dependencies included.