pub struct InitializeParams {
pub channel: Uri,
pub protocol_versions: Vec<String>,
pub client_id: String,
pub client_info: Option<Implementation>,
pub initial_subscriptions: Option<Vec<Uri>>,
pub locale: Option<String>,
pub capabilities: Option<ClientCapabilities>,
}Expand description
Establishes a new connection and negotiates the protocol version. This MUST be the first message sent by the client.
Fields§
§channel: UriChannel URI this command targets.
protocol_versions: Vec<String>Protocol versions the client is willing to speak, ordered from most
preferred to least preferred. Each entry is a SemVer
MAJOR.MINOR.PATCH string (e.g. "0.1.0").
The server selects one entry and returns it as InitializeResult.protocolVersion.
If the server cannot speak any of the offered versions, it MUST return
error code -32005 (UnsupportedProtocolVersion).
client_id: StringUnique client identifier
client_info: Option<Implementation>Optional identity of the client implementation (name and version).
Informational only — see {@link Implementation} for how it may and may not
be used. Distinct from {@link InitializeParams.clientId | clientId},
which is an opaque per-connection identifier used for reconnection, not a
human-readable implementation name.
initial_subscriptions: Option<Vec<Uri>>URIs to subscribe to during handshake
locale: Option<String>IETF BCP 47 language tag indicating the client’s preferred locale
(e.g. "en-US", "ja"). The server SHOULD use this to localise
user-facing strings such as confirmation option labels.
capabilities: Option<ClientCapabilities>Optional client capability declarations.
Servers SHOULD only advertise features whose corresponding client capability is set here. Absent means “not declared” — the server MUST assume the client does not support the feature.
Trait Implementations§
Source§impl Clone for InitializeParams
impl Clone for InitializeParams
Source§fn clone(&self) -> InitializeParams
fn clone(&self) -> InitializeParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InitializeParams
impl Debug for InitializeParams
Source§impl<'de> Deserialize<'de> for InitializeParams
impl<'de> Deserialize<'de> for InitializeParams
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>,
Source§impl PartialEq for InitializeParams
impl PartialEq for InitializeParams
Source§fn eq(&self, other: &InitializeParams) -> bool
fn eq(&self, other: &InitializeParams) -> bool
self and other values to be equal, and is used by ==.