Struct tokio::runtime::current_thread::Builder
source · 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(...)