ModuleRegistry
public final class ModuleRegistry<Config> : ModuleRegistryProtocol where Config : Sendable
extension ModuleRegistry: Comparable
Class for a ModuleRegistry. A ModuleRegistry represents a registry of modules in the application.
- property id: The UUID of the module
- property priority: The priority of the module in the registry.
- property config: The configuration for the module.
- property setup: The function that sets up the module.
-
Declaration
Swift
public let id: UUID
-
Declaration
Swift
public let priority: Int
-
Declaration
Swift
public let config: Config
-
Declaration
Swift
public let setup: @Sendable (Setup<Config>) -> Void
-
Declaration
Swift
public init(setup: @escaping @Sendable (Setup<Config>) -> (Void), priority: Int, id: UUID, config: Config)
-
Registers the module to the workflow.
Declaration
Swift
public func register(workflow: Workflow)
Parameters
workflow
The workflow to which the module is registered.
-
Compares two ModuleRegistry instances.
Declaration
Swift
public static func < (lhs: ModuleRegistry, rhs: ModuleRegistry) -> Bool
Parameters
lhs
The left-hand side ModuleRegistry instance.
rhs
The right-hand side ModuleRegistry instance.
Return Value
A boolean value indicating whether the left-hand side ModuleRegistry instance is less than the right-hand side ModuleRegistry instance.
-
Compares two ModuleRegistry instances for equality.
Declaration
Swift
public static func == (lhs: ModuleRegistry, rhs: ModuleRegistry) -> Bool
Parameters
lhs
The left-hand side ModuleRegistry instance
rhs
The right-hand side ModuleRegistry instance
Return Value
A boolean value indicating whether the left-hand side ModuleRegistry instance is equal to the right-hand side ModuleRegistry instance.