Struct solana_jsonrpc_tcp_server::tokio::runtime::current_thread::Builder [−][src]
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]
impl Builderpub fn new() -> Builder[src]
pub fn new() -> BuilderReturns a new runtime builder initialized with default configuration values.
Configuration methods can be chained on the return value.
pub fn clock(&mut self, clock: Clock) -> &mut Builder[src]
pub fn clock(&mut self, clock: Clock) -> &mut BuilderSet the Clock instance that will be used by the runtime.
pub fn build(&mut self) -> Result<Runtime, Error>[src]
pub fn build(&mut self) -> Result<Runtime, Error>Create the configured Runtime.