Module registry

Module registry 

Source
Expand description

Registry for asset signals and their computation dependencies.

This module provides a registry system for managing asset signals and their computational relationships. It defines data structures and validation logic to ensure that signal computations can be performed correctly.

The module provides:

  • The Registry struct which stores signal definitions and their relationships
  • Type-level states (Valid and Invalid) to represent validation status
  • Validation logic to ensure the registry is consistent and free of cycles
  • Serialization and deserialization support for registry persistence

§Registry Structure

The registry is a collection of Signals, each identified by a unique ID. Signals can depend on other signals for their computation, forming a directed graph. The validation process ensures this graph is acyclic and all dependencies exist.

§Module Organization

The registry module is organized into several submodules:

  • signal - Defines the structure of signals and their components
  • source - Defines data sources for signals
  • processor - Defines how to process source data into a signal value
  • post_processor - Defines transformations applied after initial processing

§Type States

The registry uses type states to distinguish between validated and unvalidated registries:

  • Registry<Invalid> - A registry that has not been validated or has failed validation
  • Registry<Valid> - A registry that has been successfully validated and is cycle free

This pattern ensures at compile time that only valid registries can be used in contexts where a valid registry is required.

Modules§

post_processor
Post-processing transformations for signal values.
processor
Processing strategies for combining source data into signal values.
signal
This module provides the core structure for defining signals in the registry system. A signal represents a specific asset or data point that can be computed from various sources, processed according to a defined strategy, and optionally transformed through post-processing steps.
source
This module provides structures for defining data sources and routing operations that transform source data before it is processed. It enables the flexible combination and transformation of data from various sources.

Structs§

Invalid
Marker type representing an unvalidated registry state.
Registry
A collection of signals with their computational dependencies.
Valid
Marker type representing a validated registry state.

Enums§

ValidationError
Errors returned during the signal validation process.