[][src]Struct tokio::runtime::current_thread::Builder

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.

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 W
pub fn clock(&mut self, clock: Clock) -> &mut Self[src]

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

impl Debug for Builder[src]

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]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]