#[non_exhaustive]pub struct AuditRecord {Show 19 fields
pub schema: String,
pub chain: String,
pub seq: u64,
pub time: String,
pub kind: String,
pub actor: Option<Actor>,
pub trace: Option<TraceRef>,
pub method: Option<String>,
pub outcome: Option<Outcome>,
pub task_id: Option<String>,
pub context_id: Option<String>,
pub message_id: Option<String>,
pub run_seq: Option<u64>,
pub event_seq: Option<u64>,
pub state: Option<String>,
pub digests: BTreeMap<String, String>,
pub detail: Map<String, Value>,
pub prev: Option<String>,
pub hash: String,
}audit only.Expand description
One entry in an audit chain.
A record is sealed by seal: it is given its chain
position, its time and the hash of the record before it, and then its own
hash is computed over everything else. Changing any field afterwards —
or deleting, inserting or reordering records — breaks the chain at that
point, which verify_chain reports.
Content is recorded by digest (digests), never verbatim: a record proves
what was said without holding it, so the log need not be a second copy of
every message’s personal data (GDPR Article 5(1)(c)). A digest of a short,
guessable text can still be reversed by guessing; it is pseudonymisation,
not anonymisation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.schema: StringAlways SCHEMA for records this version writes.
chain: StringThe chain this record belongs to: the tenant, or "" for a
single-tenant server. Each chain is ordered and hashed separately.
seq: u64Position in the chain, from 1.
time: StringWhen the record was sealed, ISO 8601 UTC with milliseconds. The writer’s wall clock, not a trusted timestamp.
kind: StringWhat happened; one of kind for records this crate writes.
actor: Option<Actor>Who caused it, when someone authenticated.
trace: Option<TraceRef>The trace the causing call belongs to.
method: Option<String>The A2A method of the call, for call and call.started records.
outcome: Option<Outcome>How the call ended, for call records.
task_id: Option<String>The task concerned.
context_id: Option<String>The task’s context.
message_id: Option<String>The message that started a run.
run_seq: Option<u64>For a task.event: the seq of the run.started record of the run
that emitted it, which names the caller the event is attributable to.
event_seq: Option<u64>For a task.event: its position in the task’s own event log, the same
number an SSE subscriber saw as id:.
state: Option<String>For a task.event that changed the task’s status: the new state.
digests: BTreeMap<String, String>SHA-256 digests of content, each "sha256:<hex>" over the content’s
RFC 8785 canonical JSON: "message", "part.0", "event", …
detail: Map<String, Value>Kind-specific fields that have no column of their own.
prev: Option<String>The hash of the record before this one; absent only at seq 1.
hash: String"sha256:<hex>" over this record’s canonical JSON without hash.
Implementations§
Trait Implementations§
Source§impl Clone for AuditRecord
impl Clone for AuditRecord
Source§fn clone(&self) -> AuditRecord
fn clone(&self) -> AuditRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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<AuditRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuditRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AuditRecord
impl PartialEq for AuditRecord
Source§impl Serialize for AuditRecord
impl Serialize for AuditRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for AuditRecord
Auto Trait Implementations§
impl Forget for AuditRecord
impl Freeze for AuditRecord
impl Move 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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>,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].