pub struct Config { /* private fields */ }
Expand description
Structure for configuration.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(thread_count: usize) -> Result<Config, ConfigError>
pub fn new(thread_count: usize) -> Result<Config, ConfigError>
Creates new configuration structure.
First parameter - number of threads. You can get this value from num_cpus
crate.
Sourcepub fn get_thread_count(&self) -> usize
pub fn get_thread_count(&self) -> usize
Returns number of used threads.
Sourcepub fn set_limit_result_channel(
&mut self,
value: usize,
) -> Result<&mut Self, ConfigError>
pub fn set_limit_result_channel( &mut self, value: usize, ) -> Result<&mut Self, ConfigError>
Set limit for sync channel of result values.
Sourcepub fn get_limit_result_channel(&self) -> usize
pub fn get_limit_result_channel(&self) -> usize
Returns limit for sync channel of result values.
Sourcepub fn set_limit_task_channel(
&mut self,
value: usize,
) -> Result<&mut Self, ConfigError>
pub fn set_limit_task_channel( &mut self, value: usize, ) -> Result<&mut Self, ConfigError>
Set limit for sync channel of tasks.
Sourcepub fn get_limit_task_channel(&self) -> usize
pub fn get_limit_task_channel(&self) -> usize
Returns limit for sync channel of tasks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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