0.2.0 Preview 1 · Frozen documentation
StableId
Overrides the canonical nominal StableTypeId with one UUID.
Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. 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 ↗