Skip to main content

Presentation

Struct Presentation 

Source
pub struct Presentation {
    pub antigen_type: String,
    pub file: PathBuf,
    pub line: usize,
    pub item_kind: String,
    pub item_target: ItemTarget,
    pub match_kind: MatchKind,
    pub canonical_path: Option<String>,
    pub inherited_from: Option<Vec<ProvenanceEntry>>,
    pub structural_fingerprint: String,
    pub requires_predicate: Option<String>,
    pub proof: Option<String>,
}
Expand description

A #[presents(antigen_type)] declaration or synthetic fingerprint match discovered in source.

Fields§

§antigen_type: String

The antigen type referenced (last path segment, e.g., PanickingInDrop).

§file: PathBuf

Source file path.

§line: usize

Line number.

§item_kind: String

Item kind that was annotated (impl, fn, struct, etc.).

§item_target: ItemTarget

Item identity for structural matching against Immunity. W3.

§match_kind: MatchKind

How this presentation was discovered: explicit marker vs fingerprint match. W6a. Defaults to ExplicitMarker for backwards compatibility with serialized reports from before W6a.

§canonical_path: Option<String>

Canonical declaration site of the antigen referenced by this presentation (not the presentation’s own location). ADR-017. None for intra-workspace antigens; Some("<crate>@<version>") for cross-crate antigens (set by the --include-deps driver after scanning the dependency crate root).

§inherited_from: Option<Vec<ProvenanceEntry>>

Provenance chain of ancestor antigens this presentation was inherited from. ADR-018 (propagation semantics).

  • None = direct presentation (explicit marker or fingerprint match).
  • Some(chain) = synthesized via the propagation walk; the chain names every transitive ancestor antigen whose presentation propagated here (set-union across diamond paths). Empty Vec inside Some is forbidden — normalised to None at construction.

Audit emits a warn-level diagnostic for presentations with inherited_from = Some(_) that lack a re-attested immunity or tolerance on the descendant site (state 7 of the 7-state matrix).

§structural_fingerprint: String

FNV-1a structural digest of the presented item at scan time. Populated for FingerprintMatch presentations; empty string for ExplicitMarker presentations and inherited presentations where the ancestor was an explicit marker. Allows adopters to pass this value directly to attest scaffold --fingerprint without needing an #[immune] marker first (DX finding 6).

§requires_predicate: Option<String>

Substrate-witness predicate JSON folded onto the presents-site via #[presents(X, requires = <predicate>)] (ADR-029 R5 — the substrate-tier migration target for #[immune(requires=...)]). Some only when the presents-site carries site-attached substrate evidence. The audit evaluates this against .attest/ sidecars to grade the immune-state verdict.

#[serde(default)] so pre-ADR-029 reports deserialize cleanly.

§proof: Option<String>

Phantom-type proof expression folded onto the presents-site via #[presents(X, proof = <expr>)] (ADR-029 R5 — the phantom-tier migration target for #[immune(witness = <phantom>)]), rendered as its token string (e.g. NonPanickingProof :: < T > :: verified). The audit recognizes the phantom shape structurally and grades FormalProof.

#[serde(default)] so pre-ADR-029 reports deserialize cleanly.

Trait Implementations§

Source§

impl Clone for Presentation

Source§

fn clone(&self) -> Presentation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Presentation

Source§

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

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

impl<'de> Deserialize<'de> for Presentation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Presentation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.