sync-lsp 0.1.0

A synchronous LSP library for servers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{Server, TypeProvider};
use crate::connection::Callback;

pub(crate) struct Shutdown<T: TypeProvider>
    (pub(crate) fn(&mut Server<T>));

impl<T: TypeProvider> Shutdown<T> {

    pub(crate) const METHOD: &'static str = "shutdown";
    
    pub(crate) fn callback(&self) -> Callback<Server<T>> {
        let Shutdown(callback) = *self;
        Callback::request(move |server, _: ()| callback(server))
    }
}