pub struct Transport { /* private fields */ }Expand description
The transport defines how data is sent and received from the client.
The langauge server protocol commonly uses stdio and ipc, but tcp and custom transports are also supported. All errors that occur during sending and receiving will cause the Server::serve method to immediately return with an error variant.
Implementations§
Source§impl Transport
impl Transport
Sourcepub fn custom(
input: impl BufRead + 'static,
output: impl Write + 'static,
) -> Transport
pub fn custom( input: impl BufRead + 'static, output: impl Write + 'static, ) -> Transport
Creates a new transport from the given input and output streams. This transport will not support polling and therefore will not be able to support request cancellation.
§Arguments
input- The input stream to read from.
Auto Trait Implementations§
impl !Freeze for Transport
impl !RefUnwindSafe for Transport
impl !Send for Transport
impl !Sync for Transport
impl Unpin for Transport
impl !UnwindSafe for Transport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more