pub struct InitializeParams {
pub channel: Uri,
pub protocol_versions: Vec<String>,
pub client_id: String,
pub initial_subscriptions: Option<Vec<Uri>>,
pub locale: Option<String>,
}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
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.
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 ==.