pub struct SpawnedStream {
pub events: UnboundedReceiver<StreamEvent>,
pub cleanup: SpawnedStreamCleanup,
}Expand description
A supervised convenience stream with an explicit completion handle.
ClaudeAgentClient::spawn_stream_message remains the compatibility API
for callers that only need a receiver. Hosts that own a subprocess lifecycle
can use this form to await the stream task after dropping the receiver and
thereby prove that the SDK closed and reaped its CLI child.
Fields§
§events: UnboundedReceiver<StreamEvent>§cleanup: SpawnedStreamCleanupAuto Trait Implementations§
impl !RefUnwindSafe for SpawnedStream
impl !UnwindSafe for SpawnedStream
impl Freeze for SpawnedStream
impl Send for SpawnedStream
impl Sync for SpawnedStream
impl Unpin for SpawnedStream
impl UnsafeUnpin for SpawnedStream
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> 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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more