pub struct ErrorNamespace { /* private fields */ }Expand description
Error namespace type - enforces frozen taxonomy.
Namespaces are locked at compile-time with no runtime construction:
- Private field prevents user construction
- Only const instances are exported (see
namespacesmodule) - Cannot be moved or duplicated at runtime
Each namespace has authority flags determining permitted operations:
- Which categories are semantically valid
- Whether Breach-level impacts are allowed (strict_severity mode)
§No-Copy, No-Move Semantics
This type does not implement Copy or Clone, and cannot be constructed at runtime. Namespaces exist only as const statics, making governance a compile-time property, not a runtime discipline.
This is the identity layer - completely frozen.
§Authority Flags
Each namespace carries const authority flags:
CAN_BREACH: Whether Breach-level impacts (951-1000) are permitted
This allows authority to evolve independently of namespace identity.
Implementations§
Source§impl ErrorNamespace
impl ErrorNamespace
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Get the string representation for external display. Zero-allocation - returns static string.
Sourcepub const fn can_breach(&self) -> bool
pub const fn can_breach(&self) -> bool
Check if this namespace permits Breach-level impacts (951-1000).
§Strict Severity Mode
When strict_severity feature is enabled, this authority is enforced
at error code construction. Without the feature, it’s advisory only.
Authority is granted via const flag, allowing architectural evolution without hardcoded namespace checks.