pub struct ProvStamp {
pub bundle_id: String,
pub version: String,
pub combined_hash: String,
}Expand description
The provenance stamp on EVERY served tool result (success AND error
envelope) — the bundle_id@version identity plus the combined_hash
integrity anchor (Codex HIGH #3).
Constructed from a verified WorkbookBundle::stamp
(pmcp_workbook_runtime::BundleLock) by ProvStamp::from_bundle. The
combined_hash field carries pmcp_workbook_runtime::BundleLock::combined
— NOT pmcp_workbook_runtime::BundleLock::workbook_hash (the source-workbook
hash). The two MUST never be conflated: combined_hash flips when ANY bundle
artifact changes, binding the response to the exact verified bundle.
The field names ARE the wire contract (pinned by
tests/workbook_provstamp_contract.rs), so the serde derives serialize the
stamp directly — every projection (to_json, the workbook:// URI payload,
the advertised schema) shares this one definition.
Fields§
§bundle_id: StringThe neutral bundle identifier (e.g. "tax-calc").
version: StringThe semver version (e.g. "1.1.0").
combined_hash: StringThe BUNDLE.lock COMBINED hash-of-hashes (NEVER the source-workbook
hash — Codex HIGH #3).
Implementations§
Source§impl ProvStamp
impl ProvStamp
Sourcepub fn from_bundle(bundle: &WorkbookBundle) -> Self
pub fn from_bundle(bundle: &WorkbookBundle) -> Self
Build the served provenance stamp from a verified WorkbookBundle.
The combined_hash is taken from bundle.stamp.combined (the
BUNDLE.lock combined hash-of-hashes) — explicitly NOT
bundle.stamp.workbook_hash, so the served stamp can never carry the
source-workbook hash (Codex HIGH #3).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProvStamp
impl<'de> Deserialize<'de> for ProvStamp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ProvStamp
impl StructuralPartialEq for ProvStamp
Auto Trait Implementations§
impl Freeze for ProvStamp
impl RefUnwindSafe for ProvStamp
impl Send for ProvStamp
impl Sync for ProvStamp
impl Unpin for ProvStamp
impl UnsafeUnpin for ProvStamp
impl UnwindSafe for ProvStamp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more