pub struct NullBackend;Available on non-WebAssembly only.
Expand description
No-op backend that discards all events.
Useful for testing or when observability is disabled.
Implementations§
Source§impl NullBackend
impl NullBackend
Trait Implementations§
Source§impl Clone for NullBackend
impl Clone for NullBackend
Source§fn clone(&self) -> NullBackend
fn clone(&self) -> NullBackend
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 moreimpl Copy for NullBackend
Source§impl Debug for NullBackend
impl Debug for NullBackend
Source§impl Default for NullBackend
impl Default for NullBackend
Source§impl ObservabilityBackend for NullBackend
impl ObservabilityBackend for NullBackend
Source§fn record_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 McpRequestEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 McpRequestEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record a request event (called when request is received).
Source§fn record_response<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 McpResponseEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_response<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 McpResponseEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record a response event (called when response is sent).
Source§fn emit_metric<'life0, 'life1, 'async_trait>(
&'life0 self,
_metric: &'life1 McpMetric,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn emit_metric<'life0, 'life1, 'async_trait>(
&'life0 self,
_metric: &'life1 McpMetric,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit a metric data point.
Source§fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flush pending data (called on shutdown or periodically).
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Check if the backend is enabled. Read more
Auto Trait Implementations§
impl Freeze for NullBackend
impl RefUnwindSafe for NullBackend
impl Send for NullBackend
impl Sync for NullBackend
impl Unpin for NullBackend
impl UnsafeUnpin for NullBackend
impl UnwindSafe for NullBackend
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