Trait NotificationHandler

Source
pub trait NotificationHandler: Send + Sync {
    // Required methods
    fn handle_resource_update(&self, uri: &Url) -> Result<(), McpError>;
    fn handle_log_message(
        &self,
        level: &LogLevel,
        data: &Value,
        logger: &Option<String>,
    );
    fn handle_progress_update(
        &self,
        token: &String,
        progress: &f64,
        total: &Option<f64>,
    );
    fn handle_initialized(&self);
    fn handle_list_changed(&self, method: &NotificationMethod);
}

Required Methods§

Source

fn handle_resource_update(&self, uri: &Url) -> Result<(), McpError>

Source

fn handle_log_message( &self, level: &LogLevel, data: &Value, logger: &Option<String>, )

Source

fn handle_progress_update( &self, token: &String, progress: &f64, total: &Option<f64>, )

Source

fn handle_initialized(&self)

Source

fn handle_list_changed(&self, method: &NotificationMethod)

Implementors§