[][src]Struct async_global_executor::GlobalExecutorConfig

pub struct GlobalExecutorConfig {
    pub env_var: Option<&'static str>,
    pub default_threads: Option<usize>,
    pub thread_name_prefix: Option<&'static str>,
}

Configuration to init the thread pool for the multi-threaded global executor.

Fields

env_var: Option<&'static str>

The environment variable from which we'll try to parse the number of threads to spawn.

default_threads: Option<usize>

The default number of threads to spawn.

thread_name_prefix: Option<&'static str>

The prefix used to name the threads.

Implementations

impl GlobalExecutorConfig[src]

pub fn with_env_var(self, env_var: &'static str) -> Self[src]

Use the specified environment variable to find the number of threads to spawn.

pub fn with_default_threads(self, default_threads: usize) -> Self[src]

Use the specified value as the default number of threads.

pub fn with_thread_name_prefix(self, env_var: &'static str) -> Self[src]

Use the specified prefix to name the threads.

Trait Implementations

impl Debug for GlobalExecutorConfig[src]

impl Default for GlobalExecutorConfig[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.