Companion for StateModule, providing mounting, composition, and factory operations.
Attributes
- Companion
- class
- Source
- StateModule.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
StateModule.type
Members list
Type members
Classlikes
Companion for ModuleFactory.
Companion for ModuleFactory.
Attributes
- Companion
- trait
- Source
- StateModule.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ModuleFactory.type
Factory for building state modules at arbitrary paths from a fixed blueprint.
Factory for building state modules at arbitrary paths from a fixed blueprint.
Type parameters
- F
-
the effect type
- Owns
-
the owned schema tuple
- Txs
-
the transaction types tuple
Attributes
- Companion
- object
- Source
- StateModule.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
Extends two mounted state modules at the same path into one with merged schemas.
Extends two mounted state modules at the same path into one with merged schemas.
The merged module tries the first reducer, and on failure falls back to the second.
Type parameters
- F
-
the effect type
Value parameters
- a
-
the first state module
- b
-
the second state module
Attributes
- Returns
-
a merged state module with combined schemas and transactions
- Source
- StateModule.scala
Mount a single-module blueprint at a specific path, creating a StateModule.
Mount a single-module blueprint at a specific path, creating a StateModule.
This is the key operation in Phase 2: it takes a path-independent ModuleBlueprint and binds it to a concrete path, computing table prefixes and creating usable table instances.
The mounting process:
- Computes the prefix for each owned table: encodePath(Path) ++ encodeSegment(TableName) 2. Creates fresh StateTable instances bound to these prefixes 3. Wraps the reducer (StateReducer0) to create a path-aware StateReducer
Each mount produces a completely independent set of tables, ensuring that mounting the same blueprint at different paths results in isolated keyspaces.
Phase 5.5 update: Mounts Owns tables, passes through TablesProvider for Needs.
Type inference: Only Path needs to be specified explicitly. All other types (F, MName, Owns, Needs, Txs) are inferred from the blueprint parameter.
Type parameters
- Path
-
the mount path (only type parameter that needs explicit specification)
Value parameters
- blueprint
-
the module blueprint to mount
- monad
-
the Monad instance for F (used by SchemaMapper derivation)
- nodeStore
-
the MerkleTrie node store (used by SchemaMapper derivation)
- prefixFreePath
-
evidence that the path+owns combination is prefix-free
- schemaMapper
-
the schema mapper for instantiating owned tables
Attributes
- Returns
-
a mounted state module with path-bound tables
- Source
- StateModule.scala
Mount a composed blueprint at a specific path, creating a StateModule with a RoutedStateReducer.
Mount a composed blueprint at a specific path, creating a StateModule with a RoutedStateReducer.
Similar to mount but for composed blueprints that require ModuleRoutedTx for transaction routing.
Type parameters
- Path
-
the mount path (only type parameter that needs explicit specification)
Value parameters
- blueprint
-
the composed blueprint to mount
Attributes
- Returns
-
a mounted state module with a routed reducer
- Source
- StateModule.scala