pub trait ThreadArg {
const NAME: &'static str;
const LONG_NAME: &'static str;
const HELP: &'static str;
// Required method
fn default() -> usize;
// Provided methods
fn bounded_default() -> usize { ... }
fn min() -> usize { ... }
fn max() -> usize { ... }
fn range() -> RangeInclusive<usize> { ... }
}Expand description
Configuration for CLAP arguments that control the number of threads for various functions
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn bounded_default() -> usize
fn bounded_default() -> usize
The default number of threads, bounded by Self::max() This prevents potential CLAP issues on low core count machines where a fixed value in Self::default() could be greater than Self::max()
Sourcefn range() -> RangeInclusive<usize>
fn range() -> RangeInclusive<usize>
The range of allowed number of threads (inclusive on both ends)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.