pub trait AssignmentLogger {
// Required method
fn log_assignment(&self, event: AssignmentEvent);
}
Expand description
A trait for logging assignment events to your storage system. Implementations should handle persisting assignment events for analytics and tracking purposes.
Required Methods§
Sourcefn log_assignment(&self, event: AssignmentEvent)
fn log_assignment(&self, event: AssignmentEvent)
Logs the assignment event to the storage system.
§Arguments
event
- AnAssignmentEvent
to be logged.
§Examples
struct MyAssignmentLogger;
impl AssignmentLogger for MyAssignmentLogger {
fn log_assignment(&self, event: AssignmentEvent) {
// Implement assignment logging logic here
}
}
§Errors
This method should not return errors and should not panic. Errors that occur during logging should be handled internally within the implementation.
§Notes
This method is called before returning assignment to the caller, so it is important that
log_assignment
does not block the calling thread to prevent performance implications and
delays in returning assignments.