#[non_exhaustive]pub struct IsmAttributes {Show 13 fields
pub classification: Option<MarkingClassification>,
pub sci_controls: Box<[SciControl]>,
pub sar_identifiers: Box<[SarIdentifier]>,
pub aea_markings: Box<[AeaMarking]>,
pub fgi_marker: Option<FgiMarker>,
pub dissem_controls: Box<[DissemControl]>,
pub non_ic_dissem: Box<[NonIcDissem]>,
pub rel_to: Box<[Trigraph]>,
pub declassify_on: Option<Box<str>>,
pub classified_by: Option<Box<str>>,
pub derived_from: Option<Box<str>>,
pub declass_exemption: Option<DeclassExemption>,
pub token_spans: Box<[TokenSpan]>,
}Expand description
Canonical in-memory representation of a classification marking.
Produced by marque-core::parser from scanner candidates.
Consumed by marque-rules::Rule implementations for validation.
§Block ordering (CAPCO)
Fields are ordered per CAPCO block sequence: Classification → SCI → SAR → FGI marker → Dissem (incl. REL TO)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.classification: Option<MarkingClassification>The marking’s classification system and level.
None means parsing failed to identify a classification.
sci_controls: Box<[SciControl]>SCI controls (e.g., SI, TK, HCS-P). Ordered per CAPCO block ordering.
sar_identifiers: Box<[SarIdentifier]>Special Access Required identifiers.
aea_markings: Box<[AeaMarking]>Atomic Energy Act markings (CAPCO Register §6).
Includes RD, FRD, CNWDI, TFNI, SIGMA, and UCNI variants. Positioned between SAR and FGI in CAPCO block ordering.
fgi_marker: Option<FgiMarker>FGI block in US-classified markings: FGI or FGI [LIST].
Present when a US-classified document references foreign government
information. This is the marker in the banner/portion — distinct
from MarkingClassification::Fgi, which means the marking IS
foreign-classified.
None when no FGI marker is present.
dissem_controls: Box<[DissemControl]>Dissemination controls (e.g., NOFORN, RELIDO, ORCON, FISA).
non_ic_dissem: Box<[NonIcDissem]>Non-IC dissemination controls (e.g., LIMDIS, SBU, LES, SSI).
Separate authority framework (CAPCO Register §9), distinct from IC
dissem controls. In classified documents these are generally portion-
only and stripped from banners, but some values propagate to the
classified banner; see NonIcDissem::propagates_to_classified_banner
for the authoritative rule. On unclassified pages they propagate to
the banner. LES-NF and SBU-NF carry NOFORN treatment even when
stripped.
rel_to: Box<[Trigraph]>REL TO country trigraphs. USA must be present and first if non-empty.
Structurally part of the dissem block (comma-delimited), but kept as a typed field for E002 and REL TO validation rules.
declassify_on: Option<Box<str>>Declassification date from CAB (free text, e.g., “20331231”).
classified_by: Option<Box<str>>Free-text “Classified By” identifier from CAB.
derived_from: Option<Box<str>>Free-text “Derived From” source from CAB.
declass_exemption: Option<DeclassExemption>Declassification exemption code from CAB (e.g., 25X1, 50X1-HUM).
token_spans: Box<[TokenSpan]>Per-token byte spans into the original source buffer, recorded by the parser as it walks the marking string. Phase 3 added this so rules can point at the exact offending byte range instead of the whole marking. Empty for CAB markings (CAB parsing is line-structured and doesn’t go through the token-walking path).
Indexing convention: token_spans is in document order. To find the
span for the Nth DissemControl, walk the slice and pick the Nth
entry whose kind == TokenKind::DissemControl.
Implementations§
Source§impl IsmAttributes
impl IsmAttributes
Sourcepub fn us_classification(&self) -> Option<Classification>
pub fn us_classification(&self) -> Option<Classification>
Convenience accessor: returns the US classification level if this marking uses the US or Conflict classification system.
Returns None for pure FGI, NATO, or JOINT markings (use
self.classification directly for those).
Trait Implementations§
Source§impl Clone for IsmAttributes
impl Clone for IsmAttributes
Source§fn clone(&self) -> IsmAttributes
fn clone(&self) -> IsmAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more