pub struct JobStreams {
pub stdout: Arc<BoundedStream>,
pub stderr: Arc<BoundedStream>,
}Expand description
One job’s live output streams.
Handed out by JobManager::streams so a producer (the drain task behind
an external command) can write into a job that outlives the command, and so
an embedder can tail a running job with
BoundedStream::changed_since instead of a poll loop.
Fields§
§stdout: Arc<BoundedStream>The job’s stdout, written as the bytes arrive.
Fed two ways, and never both for the same bytes:
- Live, per 8 KiB chunk, by the drain task behind an external
command running for this job — but only from the stage whose stdout
is the job’s stdout (
OnlyorLastin the pipeline), soa | bstreamsband nota’s bytes on their way intob. - At completion, from the job’s captured
ExecResult, and only when nothing was streamed live. That covers a builtin-only job (echo hi &): a builtin returns its output as a value when it finishes, so there is no byte stream to tee.
Whichever fed it, the stream is closed once the job’s result is in
(JobManager::finalize_streams), so a reader can tell “no more
coming” from “nothing yet”.
stderr: Arc<BoundedStream>The job’s stderr. Same two feeds as Self::stdout, except the live
one takes every stage’s stderr, not just the last — stderr is not
piped between stages. The consequence, stated rather than papered
over: in a job mixing builtins and externals, once any external has
written stderr the completion write is skipped, so a builtin stage’s
stderr stays in the job’s ExecResult and does not reach this stream.
Trait Implementations§
Source§impl Clone for JobStreams
impl Clone for JobStreams
Source§fn clone(&self) -> JobStreams
fn clone(&self) -> JobStreams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for JobStreams
impl !UnwindSafe for JobStreams
impl Freeze for JobStreams
impl Send for JobStreams
impl Sync for JobStreams
impl Unpin for JobStreams
impl UnsafeUnpin for JobStreams
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
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
WrappingSpan::make_wrapped to wrap an AST node in a span.