pub struct JobManager {
pub jobs: Vec<Job>,
}Expand description
Manages the jobs that are currently managed by the shell.
Fields§
§jobs: Vec<Job>The jobs that are currently managed by the shell.
Implementations§
Source§impl JobManager
impl JobManager
Sourcepub fn add_as_current(&mut self, job: Job) -> &Job
pub fn add_as_current(&mut self, job: Job) -> &Job
Sourcepub fn current_job(&self) -> Option<&Job>
pub fn current_job(&self) -> Option<&Job>
Returns the current job, if there is one.
Sourcepub fn current_job_mut(&mut self) -> Option<&mut Job>
pub fn current_job_mut(&mut self) -> Option<&mut Job>
Returns a mutable reference to the current job, if there is one.
Sourcepub fn prev_job_mut(&mut self) -> Option<&mut Job>
pub fn prev_job_mut(&mut self) -> Option<&mut Job>
Returns a mutable reference to the previous job, if there is one.
Sourcepub fn resolve_job_spec(&mut self, job_spec: &str) -> Option<&mut Job>
pub fn resolve_job_spec(&mut self, job_spec: &str) -> Option<&mut Job>
Tries to resolve the given job specification to a job.
§Arguments
job_spec- The job specification to resolve.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for JobManager
impl !UnwindSafe for JobManager
impl Freeze for JobManager
impl Send for JobManager
impl Sync for JobManager
impl Unpin for JobManager
impl UnsafeUnpin for JobManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more