pub struct GlobalExecutorConfig { /* private fields */ }
Expand description
Configuration to init the thread pool for the multi-threaded global executor.
Implementations
sourceimpl GlobalExecutorConfig
impl GlobalExecutorConfig
sourcepub fn with_env_var(self, env_var: &'static str) -> Self
pub fn with_env_var(self, env_var: &'static str) -> Self
Use the specified environment variable to find the number of threads to spawn.
sourcepub fn with_min_threads(self, min_threads: usize) -> Self
pub fn with_min_threads(self, min_threads: usize) -> Self
Use the specified value as the minimum number of threads.
sourcepub fn with_max_threads(self, max_threads: usize) -> Self
pub fn with_max_threads(self, max_threads: usize) -> Self
Use the specified value as the maximum number of threads.
Trait Implementations
sourceimpl Debug for GlobalExecutorConfig
impl Debug for GlobalExecutorConfig
sourceimpl Default for GlobalExecutorConfig
impl Default for GlobalExecutorConfig
sourcefn default() -> GlobalExecutorConfig
fn default() -> GlobalExecutorConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for GlobalExecutorConfig
impl Send for GlobalExecutorConfig
impl Sync for GlobalExecutorConfig
impl Unpin for GlobalExecutorConfig
impl !UnwindSafe for GlobalExecutorConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more