Skip to main content

FeatureId

Enum FeatureId 

Source
pub enum FeatureId {
    EditDistance1,
    EditDistance2,
    TokenReorder,
    SupersededToken,
    BaseRateCommonMarking,
    StrictContextClassification,
    CorpusOverrideInEffect,
}
Expand description

Closed enumeration of features the decoder can record.

New variants MUST bump the audit schema version (see MARQUE_AUDIT_SCHEMA in crates/engine/build.rs). Treat this enum as part of the on-the-wire audit contract.

Variants§

§

EditDistance1

Observed form is edit-distance 1 from a canonical token.

§

EditDistance2

Observed form is edit-distance 2 from a canonical token.

§

TokenReorder

Observed form is a token-order permutation of a canonical banner/portion shape.

§

SupersededToken

Observed form is a known CAPCO-2016-superseded token whose replacement is unambiguous (e.g., COMINT → SI).

§

BaseRateCommonMarking

The candidate’s base rate in the target corpus dominates the posterior (common-marking prior).

§

StrictContextClassification

Strict-context classification floor (FR-011) applied — e.g., banner at TOP SECRET forces a strict posterior for classification tokens at ≥ that level on the same page.

§

CorpusOverrideInEffect

Corpus-override data (opt-in, non-WASM, non-server) shifted the posterior. Recorded so an auditor can identify fixes produced under organizational overrides vs. stock priors.

Implementations§

Source§

impl FeatureId

Source

pub const fn as_str(self) -> &'static str

Canonical on-the-wire string label for this feature.

This is the single source of truth for FeatureId → audit-record-string projection. Audit emitters (CLI, WASM, server) and snapshot tests MUST call this method rather than re-implementing the match. A new FeatureId variant added without a matching as_str arm fails the exhaustiveness check here at compile time, so the on-the-wire contract cannot drift silently across emitters.

Returns a &'static str so callers can embed the value in zero-copy serialization paths (Serialize derives, serde_json::json! etc.) without an allocation.

Trait Implementations§

Source§

impl Clone for FeatureId

Source§

fn clone(&self) -> FeatureId

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 FeatureId

Source§

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

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

impl Hash for FeatureId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FeatureId

Source§

fn eq(&self, other: &FeatureId) -> 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 Copy for FeatureId

Source§

impl Eq for FeatureId

Source§

impl StructuralPartialEq for FeatureId

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.