pub struct DisplayOnly<T> { /* private fields */ }Expand description
The marker for a manifest field whose value PROVABLY reaches no verdict (F79, ADR-0007 Option A).
Strictness in this file is proportional to consequence. An unknown KEY may
be a gate rule being silently ignored, so it rejects (ADR-0001). An unknown
value in a field that only feeds disclosure text costs one NOTE line, and
charging it the whole-manifest price took every verb down together — in the
fail-open direction (F71). So: a field wrapped in this type degrades an
unrecognized string to T::default() and keeps the raw text, so the
value carries its own provenance to wherever it is rendered. A value of the
wrong TOML type is a malformed manifest, not a typo, and still rejects.
The leniency is a property of the type, not of a reviewer’s per-field call:
crates/pushkin-core/tests/manifest_display_only.rs scans this file and
asserts the marker sits on exactly one field. Wrapping another field changes
that list, which is what makes it a reviewed act rather than a silent
widening — Option C of the record (every unknown value warns) is the
N13-forbidden shape, and this guard is what keeps A from drifting into it.
Compares equal to the value it carries, so call sites and committed suites that compare against the plain enum keep reading naturally. A degradation is never silent: the consumer that renders the field owns the disclosure.
Implementations§
Source§impl<T> DisplayOnly<T>
impl<T> DisplayOnly<T>
Trait Implementations§
Source§impl<T: Clone> Clone for DisplayOnly<T>
impl<T: Clone> Clone for DisplayOnly<T>
Source§fn clone(&self) -> DisplayOnly<T>
fn clone(&self) -> DisplayOnly<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more