pub struct AuditRecord {
pub rec_hash: String,
pub from: Option<RecStatus>,
pub to: RecStatus,
pub actor: String,
pub observer_type: ObserverType,
pub because: String,
pub previous_audit_hash: Option<String>,
pub gating: Option<GatingEvidence>,
pub at_ms: i64,
}Expand description
One immutable audit Observation per transition, hash-chained per recommendation.
Fields§
§rec_hash: String§from: Option<RecStatus>§to: RecStatus§actor: StringHost-asserted actor label, e.g. user:alice, agent:worker-3,
policy:auto.
observer_type: ObserverType§because: StringMandatory written reason (≤500 chars), the review statement’s BECAUSE.
previous_audit_hash: Option<String>§gating: Option<GatingEvidence>§7.4: present exactly when this transition applied a code revision — the evalset-run edge, recorded where the forensics look.
at_ms: i64Implementations§
Source§impl AuditRecord
impl AuditRecord
Sourcepub fn to_grain_spec(&self, namespace: &str) -> GrainSpec
pub fn to_grain_spec(&self, namespace: &str) -> GrainSpec
Build the Observation grain that records this transition. derived_from
chains [rec_hash, previous_audit_hash] per the lifecycle spec.
Trait Implementations§
Source§impl Clone for AuditRecord
impl Clone for AuditRecord
Source§fn clone(&self) -> AuditRecord
fn clone(&self) -> AuditRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AuditRecord
impl Debug for AuditRecord
Source§impl<'de> Deserialize<'de> for AuditRecord
impl<'de> Deserialize<'de> for AuditRecord
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
Source§impl PartialEq for AuditRecord
impl PartialEq for AuditRecord
Source§impl Serialize for AuditRecord
impl Serialize for AuditRecord
impl StructuralPartialEq for AuditRecord
Auto Trait Implementations§
impl Freeze for AuditRecord
impl RefUnwindSafe for AuditRecord
impl Send for AuditRecord
impl Sync for AuditRecord
impl Unpin for AuditRecord
impl UnsafeUnpin for AuditRecord
impl UnwindSafe for AuditRecord
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