Skip to main content

Server

Struct Server 

Source
pub(crate) struct Server<'conn> {
    connection: &'conn Connection,
    encoding: Encoding,
    workspace: Workspace,
}

Fields§

§connection: &'conn Connection§encoding: Encoding§workspace: Workspace

Implementations§

Source§

impl<'conn> Server<'conn>

Source

pub(crate) fn new(connection: &'conn Connection, encoding: Encoding) -> Self

Source

pub(crate) fn run(self) -> Result<()>

Runs until the client asks the server to shut down or closes the connection.

Source

fn handle_request(&self, request: Request) -> Response

Source

fn handle_notification(&mut self, notification: Notification) -> Result<()>

Source

fn send_refreshed(&self, refreshed: Refreshed) -> Result<()>

Source

fn notify<N: LspNotification>(&self, params: N::Params) -> Result<()>

Source

fn completion(&self, params: &CompletionParams) -> Option<CompletionResponse>

Source

fn signature_help(&self, params: &SignatureHelpParams) -> Option<SignatureHelp>

Source

fn hover(&self, params: &HoverParams) -> Option<Hover>

Source

fn semantic_tokens( &self, params: &SemanticTokensParams, ) -> Option<SemanticTokensResult>

Source

fn document_symbols( &self, params: &DocumentSymbolParams, ) -> Option<DocumentSymbolResponse>

Source

fn definition( &self, params: &GotoDefinitionParams, ) -> Option<GotoDefinitionResponse>

Source

fn references(&self, params: &ReferenceParams) -> Option<Vec<Location>>

Source

fn highlights( &self, params: &DocumentHighlightParams, ) -> Option<Vec<DocumentHighlight>>

Source

fn locate(&self, params: &TextDocumentPositionParams) -> Option<Cursor<'_>>

The project file a request points into, and the byte offset it points at.

Auto Trait Implementations§

§

impl<'conn> !RefUnwindSafe for Server<'conn>

§

impl<'conn> Freeze for Server<'conn>

§

impl<'conn> Send for Server<'conn>

§

impl<'conn> Sync for Server<'conn>

§

impl<'conn> Unpin for Server<'conn>

§

impl<'conn> UnsafeUnpin for Server<'conn>

§

impl<'conn> UnwindSafe for Server<'conn>

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> 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, 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.