Struct nickel::Options [] [src]

pub struct Options {
    // some fields omitted
}

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));

Methods

impl Options
[src]

fn output_on_listen(self, output: bool) -> Self

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

Defaults to true.

fn thread_count(self, thread_count: Option<usize>) -> Self

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

Defaults to None.

Trait Implementations

impl Default for Options
[src]

fn default() -> Self

Returns the "default value" for a type. Read more