pub struct ApplicabilityNote {
pub reason: ApplicabilityReason,
pub explanation: &'static str,
}Expand description
A single applicability finding: which rule fired, and a publication-ready explanation.
explanation is meant to end up verbatim on a public docs page (see the plan’s “Export für
die Doku” section): factual, no superlatives, no performance claims.
Derives Serialize only, not Deserialize: the &'static str explanation field can only be
deserialized into a 'static lifetime, which conflicts with serde_derive’s generic 'de
once this type sits behind a Vec inside Applicability (a struct field of a concrete
&'static str alone can derive Deserialize by adding a 'de: 'static bound to its own impl,
but that bound cannot be discharged once another type calls into it generically). These are
computed diagnostic outputs, never something reconstructed from JSON, so this is not a loss.
Fields§
§reason: ApplicabilityReason§explanation: &'static strTrait Implementations§
Source§impl Clone for ApplicabilityNote
impl Clone for ApplicabilityNote
Source§fn clone(&self) -> ApplicabilityNote
fn clone(&self) -> ApplicabilityNote
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more