pub struct Server<I, O, L = ClientSocket> { /* private fields */ }
Expand description

Server for processing requests and responses on standard I/O or TCP.

Implementations

Creates a new Server with the given stdin and stdout handles.

Sets the server concurrency limit to max.

This setting specifies how many incoming requests may be processed concurrently. Setting this value to 1 forces all requests to be processed sequentially, thereby implicitly disabling support for the $/cancelRequest notification.

If not explicitly specified, max defaults to 4.

Preference over standard tower middleware

The ConcurrencyLimit and Buffer middlewares provided by tower rely on tokio::spawn in common usage, while this library aims to be executor agnostic and to support exotic targets currently incompatible with tokio, such as WASM. As such, Server includes its own concurrency facilities that don’t require a global executor to be present.

Spawns the service with messages read through stdin and responses written to stdout.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.