[−][src]Struct tokio::runtime::current_thread::Builder
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(...)
Methods
impl Builder
[src]
pub fn new() -> Builder
[src]
Returns a new runtime builder initialized with default configuration values.
Configuration methods can be chained on the return value.
ⓘImportant traits for &'_ mut Wpub fn clock(&mut self, clock: Clock) -> &mut Self
[src]
ⓘImportant traits for &'_ mut W
Set the Clock
instance that will be used by the runtime.
pub fn build(&mut self) -> Result<Runtime>
[src]
Create the configured Runtime
.
Trait Implementations
Auto Trait Implementations
impl Send for Builder
impl Unpin for Builder
impl Sync for Builder
impl !UnwindSafe for Builder
impl !RefUnwindSafe for Builder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Wfn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut W
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,