pub struct AuditLayer { /* private fields */ }Expand description
Tower layer that adds structured audit logging to all MCP requests.
This layer emits one structured tracing event per request at completion,
using target mcp::audit. Events contain the method, operation details,
duration, status, and tool annotation hints when available.
§Example
ⓘ
use tower_mcp::middleware::AuditLayer;
let transport = HttpTransport::new(router)
.layer(AuditLayer::new());Implementations§
Trait Implementations§
Source§impl Clone for AuditLayer
impl Clone for AuditLayer
Source§fn clone(&self) -> AuditLayer
fn clone(&self) -> AuditLayer
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 moreSource§impl Debug for AuditLayer
impl Debug for AuditLayer
Source§impl Default for AuditLayer
impl Default for AuditLayer
Source§impl<S> Layer<S> for AuditLayer
impl<S> Layer<S> for AuditLayer
impl Copy for AuditLayer
Auto Trait Implementations§
impl Freeze for AuditLayer
impl RefUnwindSafe for AuditLayer
impl Send for AuditLayer
impl Sync for AuditLayer
impl Unpin for AuditLayer
impl UnsafeUnpin for AuditLayer
impl UnwindSafe for AuditLayer
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