pub struct ServerBuilder { /* private fields */ }
Expand description

HTTP server builder.

Implementations

Makes a new ServerBuilder instance.

Adds a HTTP request handler.

Errors

If the path and method of the handler conflicts with the already registered handlers, an ErrorKind::InvalidInput error will be returned.

Adds a HTTP request handler with the given options.

Errors

If the path and method of the handler conflicts with the already registered handlers, an ErrorKind::InvalidInput error will be returned.

Sets the logger of the server.

The default value is Logger::root(Discard, o!()).

Sets MetricBuilder used by the server.

The default value is MetricBuilder::default().

Sets the application level read buffer size of the server in bytes.

The default value is 8192.

Sets the application level write buffer size of the server in bytes.

The default value is 8192.

Sets the options of the request decoder of the server.

The default value is DecodeOptions::default().

Builds a HTTP server with the given settings.

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.