pub struct RuntimeBuilder { /* private fields */ }Available on crate feature
runtime only.Expand description
Builder for Runtime.
Implementations§
Source§impl RuntimeBuilder
impl RuntimeBuilder
Sourcepub fn new() -> RuntimeBuilder
pub fn new() -> RuntimeBuilder
Create the builder with default config.
Sourcepub fn with_proactor(&mut self, builder: ProactorBuilder) -> &mut RuntimeBuilder
pub fn with_proactor(&mut self, builder: ProactorBuilder) -> &mut RuntimeBuilder
Replace proactor builder.
Sourcepub 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.
Sourcepub 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§
Source§impl Clone for RuntimeBuilder
impl Clone for RuntimeBuilder
Source§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 moreSource§impl Debug for RuntimeBuilder
impl Debug for RuntimeBuilder
Source§impl Default for RuntimeBuilder
impl Default for RuntimeBuilder
Source§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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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