[−][src]Struct tower_lsp::Server
Server for processing requests and responses on stdin
and stdout
.
Methods
impl<I, O> Server<I, O, Nothing> where
I: AsyncRead + Send + 'static,
O: AsyncWrite + Send + 'static,
[src]
I: AsyncRead + Send + 'static,
O: AsyncWrite + Send + 'static,
pub fn new(stdin: I, stdout: O) -> Self
[src]
Creates a new Server
with the given stdin
and stdout
handles.
impl<I, O, S> Server<I, O, S> where
I: AsyncRead + Send + 'static,
O: AsyncWrite + Send + 'static,
S: Stream<Item = String, Error = ()> + Send + 'static,
[src]
I: AsyncRead + Send + 'static,
O: AsyncWrite + Send + 'static,
S: Stream<Item = String, Error = ()> + Send + 'static,
pub fn interleave<T>(self, stream: T) -> Server<I, O, T> where
T: Stream<Item = String, Error = ()> + Send + 'static,
[src]
T: Stream<Item = String, Error = ()> + Send + 'static,
Interleaves the given stream of messages into stdout
together with the responses.
pub fn serve<T>(
self,
service: T
) -> impl Future<Item = (), Error = ()> + Send + 'static where
T: Service<String, Response = String> + Send + 'static,
T::Future: Send + 'static,
[src]
self,
service: T
) -> impl Future<Item = (), Error = ()> + Send + 'static where
T: Service<String, Response = String> + Send + 'static,
T::Future: Send + 'static,
Spawns the service with messages read through stdin
and responses printed to stdout
.
Trait Implementations
Auto Trait Implementations
impl<I, O, S> Unpin for Server<I, O, S> where
I: Unpin,
O: Unpin,
S: Unpin,
I: Unpin,
O: Unpin,
S: Unpin,
impl<I, O, S> Send for Server<I, O, S> where
I: Send,
O: Send,
S: Send,
I: Send,
O: Send,
S: Send,
impl<I, O, S> Sync for Server<I, O, S> where
I: Sync,
O: Sync,
S: Sync,
I: Sync,
O: Sync,
S: Sync,
impl<I, O, S> UnwindSafe for Server<I, O, S> where
I: UnwindSafe,
O: UnwindSafe,
S: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
S: UnwindSafe,
impl<I, O, S> RefUnwindSafe for Server<I, O, S> where
I: RefUnwindSafe,
O: RefUnwindSafe,
S: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
S: RefUnwindSafe,
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,