pub struct AuditConfig {
pub sink: Arc<dyn AuditSink>,
}Expand description
Resolved audit-log configuration loaded from the process environment.
Fields§
§sink: Arc<dyn AuditSink>The selected sink, wrapped in an Arc so the middleware can
clone cheaply into each request.
Implementations§
Source§impl AuditConfig
impl AuditConfig
Sourcepub fn from_sink(sink: Arc<dyn AuditSink>) -> Self
pub fn from_sink(sink: Arc<dyn AuditSink>) -> Self
Construct from an explicit sink. Used by tests and embedders.
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Load from $TENSOR_WASM_API_AUDIT_LOG.
Falls back to StdoutJsonSink when the variable is unset or
empty. A file: prefix that fails to open emits a startup
tracing::error! and degrades to stdout — refusing to start
because a log target is unavailable would be hostile in containers
where the path is mounted asynchronously.
Trait Implementations§
Source§impl Clone for AuditConfig
impl Clone for AuditConfig
Source§fn clone(&self) -> AuditConfig
fn clone(&self) -> AuditConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditConfig
impl Debug for AuditConfig
Auto Trait Implementations§
impl !RefUnwindSafe for AuditConfig
impl !UnwindSafe for AuditConfig
impl Freeze for AuditConfig
impl Send for AuditConfig
impl Sync for AuditConfig
impl Unpin for AuditConfig
impl UnsafeUnpin for AuditConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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