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
sourceimpl Builder
impl Builder
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more