Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

AttributeRetention

Selects whether a frozen typed attribute remains runtime-reflectable.

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.meta

import std.meta;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

AttributeRetention

pub enum AttributeRetention

Selects whether a frozen typed attribute remains runtime-reflectable.

Construction and compiler/tooling effects always occur during compilation. Runtime retention controls only emission of the immutable reflection record.

AttributeRetention.Runtime

Runtime;

Retains the frozen application when reflection is enabled.

AttributeRetention.CompileTimeOnly

CompileTimeOnly;

Omits the runtime record while preserving compile-time semantic metadata.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library