pub enum CodeTexture {
Code,
Blob,
Prose,
Numeric,
Mixed,
}Expand description
Code-tuned texture - a fork of texture_of for the construct/POS layer.
The generic classifier is built for the {prose, code, math, data} split and
reads alpha-heavy base64 as Prose; the code layer needs {code, blob,
prose, numeric}, where a packed / base64 / hex run is Blob (a lower 0.78
entropy gate, no high-byte requirement) and a digit-dense span is Numeric.
This is the byte-region signal the grammar-free construct tagger folds into
its context-key so the same surface shape resolves differently inside a
comment / string / blob than it does in live code.
Variants§
Code
Punctuation-bearing live code.
Blob
Packed / base64 / hex / binary run (an opaque literal body).
Prose
Alpha-dominant, low-punctuation prose - a comment or a natural-language string literal.
Numeric
Digit-dominant - a numeric literal run.
Mixed
None of the above decisively.
Implementations§
Source§impl CodeTexture
impl CodeTexture
Sourcepub fn key_suffix(self) -> Option<char>
pub fn key_suffix(self) -> Option<char>
A one-char context-key suffix for the decisively non-code textures, or
None for Code / Mixed so the bulk of code keys stay byte-identical
and the corpus does not re-key (only comment / string / blob / numeric
regions earn a distinct key). b blob, p prose, n numeric.