struct Noir::LocatorKey(T)

Overview

A declared slot in CodeLocator.

T is the stored shape: String for single-value slots (set/get), Array(String) for append-only ones (push/all). CodeLocator takes LocatorKey(T) and never a bare String, so the compiler is the registry check — a literal key nobody declared does not build, and pushing to a single-value slot (or getting an append-only one) is a type error rather than a silently-empty read.

Before this, the locator was a blackboard of 63 magic strings: a detector wrote one, an analyzer read it, and nothing connected the two. The only way to learn that grpc-proto has two independent reader families was to grep for the string.

Defined in:

models/locator_key.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, lifecycle : Lifecycle, owner : String) #

[View source]

Instance Method Detail

def lifecycle : Lifecycle #

[View source]
def name : String #

[View source]
def owner : String #

Subsystem that writes the slot, as a source-path fragment. Read by the integrity spec, and by whoever next has to work out why a key exists.


[View source]