[][src]Struct nickel::Options

pub struct Options { /* 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]

pub fn output_on_listen(self, output: bool) -> Self
[src]

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

Defaults to true.

pub fn thread_count(self, thread_count: Option<usize>) -> Self
[src]

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

Defaults to None.

pub fn reload_policy(self, reload_policy: ReloadPolicy) -> Self
[src]

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

Trait Implementations

impl Default for Options
[src]

Auto Trait Implementations

impl Send for Options

impl Sync for Options

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any