pub struct AuditLogger { /* private fields */ }Expand description
Audit logger with PostgreSQL backend
Implementations§
Source§impl AuditLogger
impl AuditLogger
Sourcepub async fn log(&self, entry: AuditEntry) -> Result<i64, AuditError>
pub async fn log(&self, entry: AuditEntry) -> Result<i64, AuditError>
Sourcepub async fn get_recent_logs(
&self,
tenant_id: i64,
level: Option<AuditLevel>,
limit: i64,
) -> Result<Vec<AuditEntry>, AuditError>
pub async fn get_recent_logs( &self, tenant_id: i64, level: Option<AuditLevel>, limit: i64, ) -> Result<Vec<AuditEntry>, AuditError>
Trait Implementations§
Source§impl Clone for AuditLogger
impl Clone for AuditLogger
Source§fn clone(&self) -> AuditLogger
fn clone(&self) -> AuditLogger
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 moreAuto Trait Implementations§
impl Freeze for AuditLogger
impl !RefUnwindSafe for AuditLogger
impl Send for AuditLogger
impl Sync for AuditLogger
impl Unpin for AuditLogger
impl UnsafeUnpin for AuditLogger
impl !UnwindSafe for AuditLogger
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