pub struct InitializedNotificationHandler { /* private fields */ }Expand description
Special handler for notifications/initialized that manages session lifecycle
Implementations§
Source§impl InitializedNotificationHandler
impl InitializedNotificationHandler
pub fn new(session_manager: Arc<SessionManager>) -> Self
Trait Implementations§
Source§impl McpHandler for InitializedNotificationHandler
impl McpHandler for InitializedNotificationHandler
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
_params: Option<Value>,
) -> Pin<Box<dyn Future<Output = McpResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
_params: Option<Value>,
) -> Pin<Box<dyn Future<Output = McpResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle an MCP request
Source§fn handle_with_session<'life0, 'async_trait>(
&'life0 self,
params: Option<Value>,
session: Option<SessionContext>,
) -> Pin<Box<dyn Future<Output = McpResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_with_session<'life0, 'async_trait>(
&'life0 self,
params: Option<Value>,
session: Option<SessionContext>,
) -> Pin<Box<dyn Future<Output = McpResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle an MCP request with session context (default implementation calls handle)
Source§fn supported_methods(&self) -> Vec<String>
fn supported_methods(&self) -> Vec<String>
Get the methods this handler supports
Auto Trait Implementations§
impl Freeze for InitializedNotificationHandler
impl !RefUnwindSafe for InitializedNotificationHandler
impl Send for InitializedNotificationHandler
impl Sync for InitializedNotificationHandler
impl Unpin for InitializedNotificationHandler
impl !UnwindSafe for InitializedNotificationHandler
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> 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 moreCreates a shared type from an unshared type.