def atPrefix[F[_], N <: String, K0, V0](prefix: ByteVector)(using evidence$1: Monad[F], evidence$2: ValueOf[N], kCodec: ByteCodec[K0], vCodec: ByteCodec[V0], nodeStore: NodeStore[F]): StateTable[F] { type Name = N; type K = K0; type V = V0; }
Instantiate a path-independent StateTable at a specific prefix.
Instantiate a path-independent StateTable at a specific prefix.
StateTable schemas are path-independent - they define only the table name, key/value types, and codecs. This method binds a schema to a concrete prefix (computed from a module's mount path), creating a usable table instance.
This is called internally during module mounting (Phase 2). Users typically don't call this directly - instead, they define Entry schemas and let the mount machinery compute prefixes and instantiate tables.
The table name is extracted from the literal type N using ValueOf.
Type parameters
F
the effect type
K0
the key type
N
the table name (literal String type, must have ValueOf instance)
V0
the value type
Value parameters
kCodec
the key codec
nodeStore
the underlying node storage
prefix
the byte prefix for all keys in this table (computed from mount path)
vCodec
the value codec
Attributes
Returns
a concrete StateTable instance bound to the given prefix