pub struct WorkflowAuditEntry {
pub run_id: String,
pub event_type: AuditEventType,
pub timestamp_secs: u64,
pub actor: Option<String>,
pub context: Option<String>,
}Expand description
A single entry in the workflow audit trail.
Fields§
§run_id: StringWorkflow run this entry belongs to.
event_type: AuditEventTypeType of event recorded.
timestamp_secs: u64Unix timestamp (seconds since epoch) when the event occurred.
actor: Option<String>Optional actor (user or service) that triggered the event.
context: Option<String>Raw context payload (e.g. serialised diff).
Implementations§
Source§impl WorkflowAuditEntry
impl WorkflowAuditEntry
Sourcepub fn new(run_id: impl Into<String>, event_type: AuditEventType) -> Self
pub fn new(run_id: impl Into<String>, event_type: AuditEventType) -> Self
Create a new entry with the current wall-clock time.
Sourcepub fn with_timestamp(
run_id: impl Into<String>,
event_type: AuditEventType,
timestamp_secs: u64,
) -> Self
pub fn with_timestamp( run_id: impl Into<String>, event_type: AuditEventType, timestamp_secs: u64, ) -> Self
Create an entry with an explicit timestamp (useful in tests).
Sourcepub fn with_actor(self, actor: impl Into<String>) -> Self
pub fn with_actor(self, actor: impl Into<String>) -> Self
Attach an actor label.
Sourcepub fn with_context(self, ctx: impl Into<String>) -> Self
pub fn with_context(self, ctx: impl Into<String>) -> Self
Attach a context payload.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Human-readable description of this entry.
Trait Implementations§
Source§impl Clone for WorkflowAuditEntry
impl Clone for WorkflowAuditEntry
Source§fn clone(&self) -> WorkflowAuditEntry
fn clone(&self) -> WorkflowAuditEntry
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 moreAuto Trait Implementations§
impl Freeze for WorkflowAuditEntry
impl RefUnwindSafe for WorkflowAuditEntry
impl Send for WorkflowAuditEntry
impl Sync for WorkflowAuditEntry
impl Unpin for WorkflowAuditEntry
impl UnsafeUnpin for WorkflowAuditEntry
impl UnwindSafe for WorkflowAuditEntry
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