LoggingHandler

Trait LoggingHandler 

Source
pub trait LoggingHandler: Send + Sync {
    // Required method
    fn set_level(
        &self,
        level: LogLevel,
    ) -> impl Future<Output = Result<(), McpError>> + Send;
}
Expand description

Handler for logging operations.

Implement this trait to handle log messages from the client.

Required Methods§

Source

fn set_level( &self, level: LogLevel, ) -> impl Future<Output = Result<(), McpError>> + Send

Set the current logging level.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: LoggingHandler> LoggingHandler for Arc<T>

Source§

fn set_level( &self, level: LogLevel, ) -> impl Future<Output = Result<(), McpError>> + Send

Implementors§