[−][src]Struct tower_lsp::LspService
Service abstraction for the Language Server Protocol.
This service takes a JSON-RPC request as input and produces a JSON-RPC response as output. If the incoming request is a notification, then the corresponding response string will be empty.
This implements tower_service::Service
in order to remain independent from the underlying
transport and to facilitate further abstraction with middleware.
Methods
impl LspService
[src]
pub fn new<T>(server: T) -> (Self, MessageStream) where
T: LanguageServer,
[src]
T: LanguageServer,
Creates a new LspService
with the given server backend, also returning a stream of
notifications from the server back to the client.
pub fn with_handler<T, U>(server: T, handler: U) -> (Self, MessageStream) where
T: LanguageServer,
U: Into<IoHandler>,
[src]
T: LanguageServer,
U: Into<IoHandler>,
Creates a new LspService
with the given server backend a custom IoHandler
.
pub fn close_handle(&self) -> ExitReceiver
[src]
Returns a close handle which signals when the exit
notification has been received.
Trait Implementations
impl Debug for LspService
[src]
impl Service<String> for LspService
[src]
type Response = String
Responses given by the service.
type Error = ()
Errors produced by the service.
type Future = Box<dyn Future<Item = Self::Response, Error = Self::Error> + Send>
The future response value.
fn poll_ready(&mut self) -> Poll<(), Self::Error>
[src]
fn call(&mut self, request: String) -> Self::Future
[src]
Auto Trait Implementations
impl Send for LspService
impl Unpin for LspService
impl Sync for LspService
impl !RefUnwindSafe for LspService
impl !UnwindSafe for LspService
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,