pub struct AuditedInvocation {
pub invocation: Invocation,
pub turn_hashes: Vec<String>,
pub chain_hash: String,
}Expand description
An Invocation wrapped with a hash chain for tamper detection.
Each turn is hashed individually, then the concatenated hashes are hashed
again to produce a single chain_hash. Use verify to
check integrity after deserialization or storage.
Note: serde_json::Value map key order is insertion-dependent, so audit
trails verify same-instance integrity, not cross-process reproducibility.
Fields§
§invocation: InvocationThe original invocation trace.
turn_hashes: Vec<String>Hex-encoded SHA-256 of each turn’s canonical JSON.
chain_hash: StringHex-encoded SHA-256 of all turn_hashes concatenated.
Implementations§
Source§impl AuditedInvocation
impl AuditedInvocation
Sourcepub fn from_invocation(invocation: Invocation) -> Self
pub fn from_invocation(invocation: Invocation) -> Self
Wrap an Invocation with computed hash chain.
Trait Implementations§
Source§impl Clone for AuditedInvocation
impl Clone for AuditedInvocation
Source§fn clone(&self) -> AuditedInvocation
fn clone(&self) -> AuditedInvocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditedInvocation
impl Debug for AuditedInvocation
Source§impl<'de> Deserialize<'de> for AuditedInvocation
impl<'de> Deserialize<'de> for AuditedInvocation
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuditedInvocation
impl RefUnwindSafe for AuditedInvocation
impl Send for AuditedInvocation
impl Sync for AuditedInvocation
impl Unpin for AuditedInvocation
impl UnsafeUnpin for AuditedInvocation
impl UnwindSafe for AuditedInvocation
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
Mutably borrows from an owned value. Read more