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

A builder struct for starting a test Server.

Implementations

Creates a new builder with extensions and options, with HTTPS enabled. To disable this, call Self::http. Use Self::default() for a default configuration.

Also see the From implementations for this struct.

The inner Extensions can be modified with Self::with_extensions and the host::Options with Self::with_options

Disables HTTPS.

Modifies the internal Extensions with mutation. If you already have a Extensions, use From.

Modifies the internal host::Options with mutation. If you already have a host::Options, use From.

Sets the Host::path of this server.

Enables handover for this server. If you are starting the server which will take over the requests, use Self::handover_from instead. The communication socket is at path.

“Steals” the requests from previous.

Panics

Will panic if Self::enable_handover wasn’t called on previous’s ServerBuilder.

Starts a Kvarn server with the current configuraion.

The returned Server can make requests to the server, streamlining the process of testing Kvarn.

Trait Implementations

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more