pub struct Builder { /* fields omitted */ }
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.
extern crate tokio;
extern crate tokio_timer;
use tokio::runtime::current_thread::Builder;
use tokio_timer::clock::Clock;
let runtime = Builder::new()
.clock(Clock::new())
.build();
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
.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)