pub struct EnvironmentTag(/* private fields */);Expand description
An environment tag on a promotion target: dev / staging / prod
by convention, deployment-declared rather than enumerated — R0.11’s
tags are labels on promotion targets, not deployments (R0.12 builds
environments as a control plane). What a tag is not: not an isolated
store, not a trust boundary. One deployment serves the prod surface
and the staging surface from one registry, with envelope strictness
per tag.
The tag rides inside the surface key (prompt:system@prod), so the
pointer store, hash-named files, transactional moves, and canary slots
all work unchanged — the design’s open question 1, settled as leaned.
Implementations§
Source§impl EnvironmentTag
impl EnvironmentTag
Sourcepub const MAX_LEN: usize = 64
pub const MAX_LEN: usize = 64
The longest a tag may be. Tags live inside pointer keys, receipts, and journaled payloads; a bound keeps a configuration typo from minting an unbounded key.
Sourcepub fn new(tag: impl Into<String>) -> Result<Self>
pub fn new(tag: impl Into<String>) -> Result<Self>
Mint a tag. Refused: empty, over-long, carrying whitespace or
control characters, or carrying SURFACE_TAG_SEPARATOR or /
(the tenant id-prefix separator) — the characters that would make
the tagged key ambiguous downstream. Validation failures reuse the
invalid-update class, the module’s convention for contract
violations at construction time.
Trait Implementations§
Source§impl Clone for EnvironmentTag
impl Clone for EnvironmentTag
Source§impl Debug for EnvironmentTag
impl Debug for EnvironmentTag
Source§impl<'de> Deserialize<'de> for EnvironmentTag
impl<'de> Deserialize<'de> for EnvironmentTag
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Validated at deserialization (the correction-author precedent): a malformed tag in a request payload fails the parse, so no code path downstream ever holds an unvalidated one.