pub struct OutputSink { /* private fields */ }Expand description
Sink for one task-run attempt.
Created by OutputRegistry when a runner starts an attempt;
the runner pushes lines into it, subscribers (obtained via the registry) receive OutputEvents on the other end.
Implementations§
Source§impl OutputSink
impl OutputSink
Sourcepub fn new(sender: Sender<OutputEvent>, attempt: u32) -> Self
pub fn new(sender: Sender<OutputEvent>, attempt: u32) -> Self
Build a sink wrapping the given broadcast Sender.
Sourcepub fn stdout_line(&self, line: Bytes)
pub fn stdout_line(&self, line: Bytes)
Push one stdout line. No-op if no subscribers are attached.
line is bytes::Bytes (UTF-8): cloning is a refcount bump, so the
same buffer is shared across every subscriber and all the way through
to the gRPC bytes line wire field without an extra byte-copy.
Sourcepub fn stderr_line(&self, line: Bytes)
pub fn stderr_line(&self, line: Bytes)
Push one stderr line. No-op if no subscribers are attached.
Trait Implementations§
Source§impl Clone for OutputSink
impl Clone for OutputSink
Source§fn clone(&self) -> OutputSink
fn clone(&self) -> OutputSink
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OutputSink
impl RefUnwindSafe for OutputSink
impl Send for OutputSink
impl Sync for OutputSink
impl Unpin for OutputSink
impl UnsafeUnpin for OutputSink
impl UnwindSafe for OutputSink
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