pub struct InMemoryAuditLog { /* private fields */ }Expand description
In-memory audit log for testing and lightweight deployments.
Events are stored in a Vec behind a RwLock. Not durable — events are
lost on server restart. Use a database-backed implementation for production.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryAuditLog
impl Default for InMemoryAuditLog
Source§impl TenantAuditLog for InMemoryAuditLog
impl TenantAuditLog for InMemoryAuditLog
Source§fn record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_key: &'life1 str,
event: TenantEventKind,
actor: Option<&'life2 AuditActor>,
payload: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_key: &'life1 str,
event: TenantEventKind,
actor: Option<&'life2 AuditActor>,
payload: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Record a tenant lifecycle event. Read more
Source§fn events_for<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_key: &'life1 str,
limit: usize,
offset: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<TenantEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn events_for<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_key: &'life1 str,
limit: usize,
offset: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<TenantEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query events for a specific tenant, ordered by occurrence (newest first). Read more
Auto Trait Implementations§
impl !Freeze for InMemoryAuditLog
impl !RefUnwindSafe for InMemoryAuditLog
impl Send for InMemoryAuditLog
impl Sync for InMemoryAuditLog
impl Unpin for InMemoryAuditLog
impl UnsafeUnpin for InMemoryAuditLog
impl UnwindSafe for InMemoryAuditLog
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more