pub enum AuditStorage {
Memory,
Tracing,
File {
path: String,
},
Database {
connection_string: String,
},
External {
endpoint: String,
api_key: String,
},
}Expand description
Audit log storage backend.
Pairs with AuditConfig to specify where audit events are persisted.
Variants§
Memory
In-process, queryable audit storage. Supports permission_logs,
security_stats, and other query-based audit operations out of the
box, but does not persist across a restart. The default.
Tracing
Standard logging (via tracing). Write-only: events are written to
the tracing subscriber and cannot be queried back through
permission_logs/security_stats/etc. – those return a clear
error rather than silently reporting empty results. Choose this
when your log aggregation is the actual source of truth and you
don’t need this crate’s own audit-query API.
File
File-based storage
Database
Database storage
External
External service
Trait Implementations§
Source§impl Clone for AuditStorage
impl Clone for AuditStorage
Source§impl Debug for AuditStorage
impl Debug for AuditStorage
Source§impl<'de> Deserialize<'de> for AuditStorage
impl<'de> Deserialize<'de> for AuditStorage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AuditStorage
impl Display for AuditStorage
Auto Trait Implementations§
impl Freeze for AuditStorage
impl RefUnwindSafe for AuditStorage
impl Send for AuditStorage
impl Sync for AuditStorage
impl Unpin for AuditStorage
impl UnsafeUnpin for AuditStorage
impl UnwindSafe for AuditStorage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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