Development · Evolving reference
StableId
Overrides the canonical nominal StableTypeId with one UUID.
Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →
Module std.reflection
import std.reflection;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
StableId
pub attribute StableIdOverrides the canonical nominal StableTypeId with one UUID.
The lowercase normal-form UUID must be unique in the linked reflection registry; changing it is an explicit metadata compatibility break.
Example
module example.stable_id;
import std.reflection as reflection;
[reflection.StableId("2f5f7f70-83d2-4f03-9f0c-3bf895eebfd1")]
pub struct Packet { pub Code: u32; }
fn Main() -> i32 {
let Descriptor = reflection.TypeOf<Packet>();
if Descriptor.StableId == default(reflection.StableTypeId) { return 1; }
return 0;
}StableId.Value
pub Value: str;Stores the exact authored canonical UUID string.
Documentation snapshot: October 24, 2026 About versions ↗