Skip to main content

InitializeResult

Struct InitializeResult 

Source
pub struct InitializeResult {
    pub protocol_version: String,
    pub server_seq: i64,
    pub server_info: Option<Implementation>,
    pub snapshots: Vec<Snapshot>,
    pub default_directory: Option<Uri>,
    pub completion_trigger_characters: Option<Vec<String>>,
    pub terminal_command_prefix: Option<String>,
    pub telemetry: Option<TelemetryCapabilities>,
}
Expand description

Result of the initialize command.

protocolVersion is the version the server has selected from the client’s protocolVersions list. The client and server MUST use this version for the rest of the connection. If the server cannot speak any of the offered versions it MUST return error code -32005 (UnsupportedProtocolVersion) instead of a result.

Fields§

§protocol_version: String

Protocol version selected by the server. MUST be one of the entries in InitializeParams.protocolVersions. Formatted as a SemVer MAJOR.MINOR.PATCH string (e.g. "0.1.0").

§server_seq: i64

Current server sequence number

§server_info: Option<Implementation>

Optional identity of the server implementation (name and version). Informational only — see {@link Implementation} for how it may and may not be used. Whereas {@link InitializeResult.protocolVersion | protocolVersion} identifies the negotiated protocol, serverInfo identifies the host software behind it.

§snapshots: Vec<Snapshot>

Snapshots for each initialSubscriptions URI

§default_directory: Option<Uri>

Suggested default directory for remote filesystem browsing

§completion_trigger_characters: Option<Vec<String>>

Characters that, when typed in a {@link Message} input, SHOULD cause the client to issue a completions request with {@link CompletionItemKind.UserMessage}. Typically includes characters like '@' or '/'.

§terminal_command_prefix: Option<String>

Prefix that the host recognizes at the start of a user {@link Message.text} as a shorthand for executing the remainder as a terminal command. Currently the standardized convention is "!"; absence means the host does not support command prefixes.

§telemetry: Option<TelemetryCapabilities>

OTLP telemetry channels the host emits, if any. Each populated field is either a literal ahp-otlp: channel URI or an RFC 6570 URI template a client expands before subscribing (currently only the logs channel defines a template variable, {level}, for subscriber-side severity filtering). Clients MAY ignore signals they cannot process.

Trait Implementations§

Source§

impl Clone for InitializeResult

Source§

fn clone(&self) -> InitializeResult

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InitializeResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for InitializeResult

Source§

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 PartialEq for InitializeResult

Source§

fn eq(&self, other: &InitializeResult) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for InitializeResult

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for InitializeResult

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.