pub struct InitializeRequestParams {
pub meta: Option<Meta>,
pub protocol_version: ProtocolVersion,
pub capabilities: ClientCapabilities,
pub client_info: Implementation,
}Expand description
Parameters sent by a client when initializing a connection to an MCP server.
This contains the client’s protocol version, capabilities, and implementation information, allowing the server to understand what the client supports.
Fields§
§meta: Option<Meta>Protocol-level metadata for this request (SEP-1319)
protocol_version: ProtocolVersionThe MCP protocol version this client supports
capabilities: ClientCapabilitiesThe capabilities this client supports (sampling, roots, etc.)
client_info: ImplementationInformation about the client implementation
Trait Implementations§
Source§impl Clone for InitializeRequestParams
impl Clone for InitializeRequestParams
Source§fn clone(&self) -> InitializeRequestParams
fn clone(&self) -> InitializeRequestParams
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 InitializeRequestParams
impl Debug for InitializeRequestParams
Source§impl<'de> Deserialize<'de> for InitializeRequestParams
impl<'de> Deserialize<'de> for InitializeRequestParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for InitializeRequestParams
impl JsonSchema for InitializeRequestParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for InitializeRequestParams
impl PartialEq for InitializeRequestParams
Source§impl RequestParamsMeta for InitializeRequestParams
impl RequestParamsMeta for InitializeRequestParams
Source§fn progress_token(&self) -> Option<ProgressToken>
fn progress_token(&self) -> Option<ProgressToken>
Get the progress token from meta, if present
Source§fn set_progress_token(&mut self, token: ProgressToken)
fn set_progress_token(&mut self, token: ProgressToken)
Set a progress token in meta
Source§impl Serialize for InitializeRequestParams
impl Serialize for InitializeRequestParams
impl StructuralPartialEq for InitializeRequestParams
Auto Trait Implementations§
impl Freeze for InitializeRequestParams
impl RefUnwindSafe for InitializeRequestParams
impl Send for InitializeRequestParams
impl Sync for InitializeRequestParams
impl Unpin for InitializeRequestParams
impl UnwindSafe for InitializeRequestParams
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
Source§fn handle_request(
&self,
request: <R as ServiceRole>::PeerReq,
context: RequestContext<R>,
) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
Available on crate features
client or server only.Source§fn handle_notification(
&self,
notification: <R as ServiceRole>::PeerNot,
context: NotificationContext<R>,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
Available on crate features
client or server only.Source§fn get_info(&self) -> <R as ServiceRole>::Info
fn get_info(&self) -> <R as ServiceRole>::Info
Available on crate features
client or server only.Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<H> Service<RoleClient> for Hwhere
H: ClientHandler,
impl<H> Service<RoleClient> for Hwhere
H: ClientHandler,
Source§async fn handle_request(
&self,
request: <RoleClient as ServiceRole>::PeerReq,
context: RequestContext<RoleClient>,
) -> Result<<RoleClient as ServiceRole>::Resp, ErrorData>
async fn handle_request( &self, request: <RoleClient as ServiceRole>::PeerReq, context: RequestContext<RoleClient>, ) -> Result<<RoleClient as ServiceRole>::Resp, ErrorData>
Available on crate features
client or server only.Source§async fn handle_notification(
&self,
notification: <RoleClient as ServiceRole>::PeerNot,
context: NotificationContext<RoleClient>,
) -> Result<(), ErrorData>
async fn handle_notification( &self, notification: <RoleClient as ServiceRole>::PeerNot, context: NotificationContext<RoleClient>, ) -> Result<(), ErrorData>
Available on crate features
client or server only.Source§fn get_info(&self) -> <RoleClient as ServiceRole>::Info
fn get_info(&self) -> <RoleClient as ServiceRole>::Info
Available on crate features
client or server only.Source§impl<S> ServiceExt<RoleClient> for Swhere
S: Service<RoleClient>,
impl<S> ServiceExt<RoleClient> for Swhere
S: Service<RoleClient>,
Source§fn serve_with_ct<T, E, A>(
self,
transport: T,
ct: CancellationToken,
) -> impl Future<Output = Result<RunningService<RoleClient, S>, ClientInitializeError>> + Send
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleClient, S>, ClientInitializeError>> + Send
Available on crate features
client or server only.Source§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
Available on crate features
client or server only.Convert this service to a dynamic boxed service Read more
Source§fn serve<T, E, A>(
self,
transport: T,
) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + Send
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + Send
Available on crate features
client or server only.