Skip to main content

IsmAttributes

Struct IsmAttributes 

Source
#[non_exhaustive]
pub struct IsmAttributes { pub classification: Option<Classification>, pub sci_controls: Box<[SciControl]>, pub sar_identifiers: Box<[SarIdentifier]>, pub dissem_controls: Box<[DissemControl]>, 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 an IC classification marking.

Produced by marque-core::parser from scanner candidates. Consumed by marque-rules::Rule implementations for validation.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§classification: Option<Classification>

Primary classification level. None means parsing failed to identify one.

§sci_controls: Box<[SciControl]>

SCI controls (e.g., SI, TK, HCS). Ordered per CAPCO block ordering rules.

§sar_identifiers: Box<[SarIdentifier]>

Special Access Required identifiers.

§dissem_controls: Box<[DissemControl]>

Dissemination controls (e.g., NOFORN, RELIDO, ORCON, FISA).

§rel_to: Box<[Trigraph]>

REL TO country trigraphs. USA must be present and first if non-empty.

§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.

Trait Implementations§

Source§

impl Clone for IsmAttributes

Source§

fn clone(&self) -> IsmAttributes

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IsmAttributes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for IsmAttributes

Source§

fn default() -> IsmAttributes

Returns the “default value” for a type. Read more
Source§

impl PartialEq for IsmAttributes

Source§

fn eq(&self, other: &IsmAttributes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for IsmAttributes

Source§

impl StructuralPartialEq for IsmAttributes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.