#[non_exhaustive]pub struct JobInfo {
pub id: JobId,
pub command: String,
pub status: JobStatus,
pub output_file: Option<PathBuf>,
pub pid: Option<u32>,
pub latch: Option<LatchRequest>,
}Expand description
Information about a job for listing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: JobIdJob ID.
command: StringCommand description.
status: JobStatusCurrent status.
output_file: Option<PathBuf>Path to output file (if available).
pid: Option<u32>OS process ID (if this is a stopped/foreground process).
latch: Option<LatchRequest>The pending confirmation-latch request when the job is gated
(JobStatus::Latched) — the control-plane surface an embedder reads to
fulfill a backgrounded destructive op via Kernel::confirm. None
for any non-latched job. GH #96.
Implementations§
Source§impl JobInfo
impl JobInfo
Sourcepub fn new(id: JobId, command: impl Into<String>, status: JobStatus) -> JobInfo
pub fn new(id: JobId, command: impl Into<String>, status: JobStatus) -> JobInfo
Create a JobInfo with the required fields; output_file/pid/latch
default to None. Chain the with_* setters to fill them in.
#[non_exhaustive] blocks struct-literal construction from outside this
crate — this constructor plus the setters below are the replacement.
Sourcepub fn with_output_file(self, output_file: Option<PathBuf>) -> JobInfo
pub fn with_output_file(self, output_file: Option<PathBuf>) -> JobInfo
Set the output file path.
Sourcepub fn with_latch(self, latch: Option<LatchRequest>) -> JobInfo
pub fn with_latch(self, latch: Option<LatchRequest>) -> JobInfo
Set the pending confirmation-latch request (see Self::latch).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobInfo
impl RefUnwindSafe for JobInfo
impl Send for JobInfo
impl Sync for JobInfo
impl Unpin for JobInfo
impl UnsafeUnpin for JobInfo
impl UnwindSafe for JobInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.