pub struct AuditEvent {
pub id: String,
pub timestamp: DateTime<Utc>,
pub workflow_id: Option<String>,
pub correlation_id: String,
pub actor: Option<String>,
pub event_type: String,
pub payload: Value,
pub trace_id: Option<String>,
pub run_id: Option<String>,
}Expand description
A single audit record. Builder-style: AuditEvent::new(type).with_*(…).
Fields§
§id: String§timestamp: DateTime<Utc>§workflow_id: Option<String>§correlation_id: String§actor: Option<String>§event_type: String§payload: Value§trace_id: Option<String>§run_id: Option<String>Implementations§
Source§impl AuditEvent
impl AuditEvent
pub fn new(event_type: impl Into<String>) -> Self
pub fn with_workflow(self, workflow_id: impl Into<String>) -> Self
pub fn with_correlation(self, correlation_id: impl Into<String>) -> Self
pub fn with_actor(self, actor: impl Into<String>) -> Self
pub fn with_payload(self, payload: Value) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn with_run_id(self, run_id: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for AuditEvent
impl Clone for AuditEvent
Source§impl Debug for AuditEvent
impl Debug for AuditEvent
Source§impl<'de> Deserialize<'de> for AuditEvent
impl<'de> Deserialize<'de> for AuditEvent
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 AuditEvent
impl RefUnwindSafe for AuditEvent
impl Send for AuditEvent
impl Sync for AuditEvent
impl Unpin for AuditEvent
impl UnsafeUnpin for AuditEvent
impl UnwindSafe for AuditEvent
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
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<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> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.