pub struct Sizing {
pub profile: JobProfile,
pub min_cores: Option<f32>,
}Expand description
A class or preset: the profile a lease of it asks for, and the fewest cores it may start
with. The minimum is a key of the same table, such as min_cores in [classes.cpu_heavy].
Fields§
§profile: JobProfileWhat a lease of it asks for.
min_cores: Option<f32>The fewest cores a lease of it may start with; None takes
JobProfile::default_min_cores, so the default follows a changed cores.
Implementations§
Source§impl Sizing
impl Sizing
Sourcepub const fn of(profile: JobProfile) -> Self
pub const fn of(profile: JobProfile) -> Self
profile with the default minimum.
Sourcepub fn minimum(&self) -> f32
pub fn minimum(&self) -> f32
The fewest cores a lease of it may start with: the configured minimum or the default.
Sourcepub fn invalid_reason(&self) -> Option<&'static str>
pub fn invalid_reason(&self) -> Option<&'static str>
Why the profile or its minimum is unusable, or None when both are in range.
Trait Implementations§
impl Copy for Sizing
impl StructuralPartialEq for Sizing
Auto Trait Implementations§
impl Forget for Sizing
impl Freeze for Sizing
impl Move for Sizing
impl RefUnwindSafe for Sizing
impl Send for Sizing
impl Sync for Sizing
impl Unpin for Sizing
impl UnsafeUnpin for Sizing
impl UnwindSafe for Sizing
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