pub struct EventStream { /* private fields */ }Implementations§
Source§impl EventStream
impl EventStream
pub fn new( stream: impl Stream<Item = Result<AgentEvent, AgentError>> + Send + 'static, ) -> Self
pub fn from_receiver(rx: Receiver<Result<AgentEvent, AgentError>>) -> Self
Sourcepub async fn collect_turn(self) -> Result<TurnOutput, AgentError>
pub async fn collect_turn(self) -> Result<TurnOutput, AgentError>
Consume the stream and collect into a TurnOutput.
Trait Implementations§
Source§impl Stream for EventStream
impl Stream for EventStream
Source§type Item = Result<AgentEvent, AgentError>
type Item = Result<AgentEvent, AgentError>
Values yielded by the stream.
Auto Trait Implementations§
impl !RefUnwindSafe for EventStream
impl !Sync for EventStream
impl !UnwindSafe for EventStream
impl Freeze for EventStream
impl Send for EventStream
impl Unpin for EventStream
impl UnsafeUnpin for EventStream
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