pub struct ModificationLogEntry {
pub timestamp: u128,
pub operation_name: String,
pub target_id: String,
pub status: OpStatus,
pub message: String,
pub metadata: HashMap<String, String>,
}Expand description
A single entry in the modification audit trail.
Each entry captures detailed information about one operation execution, including timing, target, status, and arbitrary metadata.
Fields§
§timestamp: u128Timestamp in microseconds since UNIX epoch
operation_name: StringHuman-readable name of the operation (e.g., “CreateCausaloid”)
target_id: StringIdentifier of the target entity (e.g., causaloid ID, context ID)
status: OpStatusWhether the operation succeeded or failed
message: StringDescriptive message about the operation result
metadata: HashMap<String, String>Additional key-value metadata for detailed logging
Implementations§
Source§impl ModificationLogEntry
impl ModificationLogEntry
Sourcepub fn new(
operation_name: impl Into<String>,
target_id: impl Into<String>,
status: OpStatus,
message: impl Into<String>,
) -> Self
pub fn new( operation_name: impl Into<String>, target_id: impl Into<String>, status: OpStatus, message: impl Into<String>, ) -> Self
Creates a new log entry without a timestamp.
The timestamp will be automatically set when the entry is added to a
ModificationLog via add_entry().
§Arguments
operation_name- Name of the operation (e.g., “CreateCausaloid”)target_id- ID of the target entitystatus- Success or failure statusmessage- Descriptive message
Sourcepub fn with_metadata(
operation_name: impl Into<String>,
target_id: impl Into<String>,
status: OpStatus,
message: impl Into<String>,
metadata: HashMap<String, String>,
) -> Self
pub fn with_metadata( operation_name: impl Into<String>, target_id: impl Into<String>, status: OpStatus, message: impl Into<String>, metadata: HashMap<String, String>, ) -> Self
Creates a new log entry with metadata.
§Arguments
operation_name- Name of the operationtarget_id- ID of the target entitystatus- Success or failure statusmessage- Descriptive messagemetadata- Additional key-value metadata
Trait Implementations§
Source§impl Clone for ModificationLogEntry
impl Clone for ModificationLogEntry
Source§fn clone(&self) -> ModificationLogEntry
fn clone(&self) -> ModificationLogEntry
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 ModificationLogEntry
impl Debug for ModificationLogEntry
Source§impl PartialEq for ModificationLogEntry
impl PartialEq for ModificationLogEntry
impl Eq for ModificationLogEntry
impl StructuralPartialEq for ModificationLogEntry
Auto Trait Implementations§
impl Freeze for ModificationLogEntry
impl RefUnwindSafe for ModificationLogEntry
impl Send for ModificationLogEntry
impl Sync for ModificationLogEntry
impl Unpin for ModificationLogEntry
impl UnwindSafe for ModificationLogEntry
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