Skip to main content

Jobs

Enum Jobs 

Source
pub enum Jobs {
    Serial,
    Threads(NonZeroUsize),
}
Expand description

How many jobs to run at once.

Variants§

§

Serial

One job at a time, in order. What -j1 asks for, and what the determinism check in CI compares against.

§

Threads(NonZeroUsize)

At most this many at once.

Implementations§

Source§

impl Jobs

Source

pub fn available() -> Jobs

What the machine can do, or serial when it will not say.

Source

pub fn count(self) -> usize

The number of workers this asks for.

Source

pub fn parse(arg: &str) -> Result<Jobs, String>

Parses the argument of -j.

A bare -j with no number means “as many as the machine has”, which is what make does and therefore what people expect.

§Errors

Returns the offending text when it is not a positive number.

Trait Implementations§

Source§

impl Clone for Jobs

Source§

fn clone(&self) -> Jobs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Jobs

Source§

impl Debug for Jobs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Jobs

Source§

fn default() -> Jobs

Returns the “default value” for a type. Read more
Source§

impl Eq for Jobs

Source§

impl PartialEq for Jobs

Source§

fn eq(&self, other: &Jobs) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Jobs

Auto Trait Implementations§

§

impl Freeze for Jobs

§

impl RefUnwindSafe for Jobs

§

impl Send for Jobs

§

impl Sync for Jobs

§

impl Unpin for Jobs

§

impl UnsafeUnpin for Jobs

§

impl UnwindSafe for Jobs

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.