Struct RuntimeBuilder
pub struct RuntimeBuilder { /* private fields */ }Available on crate feature
runtime only.Expand description
Builder for Runtime.
Implementations§
§impl RuntimeBuilder
impl RuntimeBuilder
pub fn new() -> RuntimeBuilder
pub fn new() -> RuntimeBuilder
Create the builder with default config.
pub fn with_proactor(&mut self, builder: ProactorBuilder) -> &mut RuntimeBuilder
pub fn with_proactor(&mut self, builder: ProactorBuilder) -> &mut RuntimeBuilder
Replace proactor builder.
pub fn thread_affinity(&mut self, cpus: HashSet<usize>) -> &mut RuntimeBuilder
pub fn thread_affinity(&mut self, cpus: HashSet<usize>) -> &mut RuntimeBuilder
Sets the thread affinity for the runtime.
pub fn event_interval(&mut self, val: usize) -> &mut RuntimeBuilder
pub fn event_interval(&mut self, val: usize) -> &mut RuntimeBuilder
Sets the number of scheduler ticks after which the scheduler will poll for external events (timers, I/O, and so on).
A scheduler “tick” roughly corresponds to one poll invocation on a task.
Trait Implementations§
§impl Clone for RuntimeBuilder
impl Clone for RuntimeBuilder
§fn clone(&self) -> RuntimeBuilder
fn clone(&self) -> RuntimeBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for RuntimeBuilder
impl Debug for RuntimeBuilder
§impl Default for RuntimeBuilder
impl Default for RuntimeBuilder
§fn default() -> RuntimeBuilder
fn default() -> RuntimeBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuntimeBuilder
impl RefUnwindSafe for RuntimeBuilder
impl Send for RuntimeBuilder
impl Sync for RuntimeBuilder
impl Unpin for RuntimeBuilder
impl UnwindSafe for RuntimeBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more