pub struct OutputCapture { /* private fields */ }Expand description
Captures output from agent processes with @mention detection
Implementations§
Source§impl OutputCapture
impl OutputCapture
Sourcepub fn new(
process_id: ProcessId,
stdout: BufReader<ChildStdout>,
_stderr: BufReader<ChildStderr>,
) -> Self
pub fn new( process_id: ProcessId, stdout: BufReader<ChildStdout>, _stderr: BufReader<ChildStderr>, ) -> Self
Create a new output capture
Sourcepub fn subscribe(&self) -> Receiver<OutputEvent>
pub fn subscribe(&self) -> Receiver<OutputEvent>
Subscribe to live output events via broadcast channel.
Returns a receiver that gets a clone of every output event. Suitable for streaming to WebSocket clients.
Sourcepub fn broadcaster(&self) -> &Sender<OutputEvent>
pub fn broadcaster(&self) -> &Sender<OutputEvent>
Get a reference to the broadcast sender.
Sourcepub fn event_sender(&self) -> Sender<OutputEvent>
pub fn event_sender(&self) -> Sender<OutputEvent>
Get the event sender (for external use)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputCapture
impl !RefUnwindSafe for OutputCapture
impl Send for OutputCapture
impl Sync for OutputCapture
impl Unpin for OutputCapture
impl UnsafeUnpin for OutputCapture
impl !UnwindSafe for OutputCapture
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