Struct nickel::Options

source ·
pub struct Options { /* private fields */ }
Expand description

Configuration options for the server.

This struct provides a builder-style API for constructing the desired options.

Examples

use nickel::{Nickel, Options};
let mut server = Nickel::new();

// Don't print to stdout when starting the server
// and force using 8 threads.
server.options = Options::default()
                     .output_on_listen(false)
                     .thread_count(Some(8));

Implementations

Whether the server should print the local address it is listening on when starting.

Defaults to true.

The number of threads the server should use or None to use the hyper’s default of 1.25 * core_count.

Defaults to None.

The TemplateCache reload policy. Defaults to ReloadPolicy::Never.

Trait Implementations

Returns the “default value” for a type. 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.
Get the TypeId of this object.