pub struct OutputHub { /* private fields */ }Expand description
Bounded retained output with atomic snapshot-to-live subscription handoff.
Implementations§
Source§impl OutputHub
impl OutputHub
pub fn new(call_id: ToolCallId, retention_bytes: usize) -> Self
pub fn declare(&self, declaration: &ToolOutputDeclaration)
pub fn streams(&self) -> Vec<OutputStream>
pub fn emit(&self, stream: OutputStream, data: &[u8])
Sourcepub fn subscribe(
&self,
stream: OutputStream,
queue: usize,
) -> (OutputSnapshot, Receiver<OutputMessage>)
pub fn subscribe( &self, stream: OutputStream, queue: usize, ) -> (OutputSnapshot, Receiver<OutputMessage>)
Holds the same lock while taking the snapshot and registering the receiver, so subsequent deltas cannot fall into a handoff gap.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputHub
impl RefUnwindSafe for OutputHub
impl Send for OutputHub
impl Sync for OutputHub
impl Unpin for OutputHub
impl UnsafeUnpin for OutputHub
impl UnwindSafe for OutputHub
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