1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//! Structs used for auditing
use crate::time::Timestamp;
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Activity<T> {
pub when: Timestamp,
pub who: T,
}
impl<T> Activity<T> {
pub fn now(who: impl Into<T>) -> Self {
Self {
when: Timestamp::now(),
who: who.into(),
}
}
}