pub struct JsonLineReader { /* private fields */ }Implementations§
Source§impl JsonLineReader
impl JsonLineReader
pub fn new(stdout: ChildStdout) -> Self
Sourcepub async fn next_value<T: DeserializeOwned>(
&mut self,
) -> Option<Result<T, AgentError>>
pub async fn next_value<T: DeserializeOwned>( &mut self, ) -> Option<Result<T, AgentError>>
Read the next complete JSON value from stdout.
Handles JSON objects spanning multiple lines by buffering and
retrying the parse. Returns None on EOF.
Auto Trait Implementations§
impl Freeze for JsonLineReader
impl RefUnwindSafe for JsonLineReader
impl Send for JsonLineReader
impl Sync for JsonLineReader
impl Unpin for JsonLineReader
impl UnsafeUnpin for JsonLineReader
impl UnwindSafe for JsonLineReader
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