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

Builds a Single-threaded runtime with custom configuration values.

Methods can be chained in order to set the configuration values. The Runtime is constructed by calling build.

New instances of Builder are obtained via Builder::new.

See function level documentation for details on the various configuration settings.

Examples

extern crate tokio;
extern crate tokio_timer;

use tokio::runtime::current_thread::Builder;
use tokio_timer::clock::Clock;

// build Runtime
let runtime = Builder::new()
    .clock(Clock::new())
    .build();
// ... call runtime.run(...)

Implementations

Returns a new runtime builder initialized with default configuration values.

Configuration methods can be chained on the return value.

Set the Clock instance that will be used by the runtime.

Create the configured Runtime.

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.