pub struct AsyncXmlStream<R: AsyncRead + Unpin> { /* private fields */ }Expand description
Async streaming XML parser
This stream yields Result<StreamItem, String> as items are parsed.
It uses Tokio’s async I/O for non-blocking operations.
§Implementation Note
This implementation reads all data into memory first, then parses it synchronously and yields items one at a time. For true streaming with backpressure, a more sophisticated implementation using quick-xml’s async features would be needed.
Implementations§
Source§impl<R: AsyncRead + Unpin> AsyncXmlStream<R>
impl<R: AsyncRead + Unpin> AsyncXmlStream<R>
Sourcepub fn new(reader: R, config: StreamConfig) -> Result<Self, String>
pub fn new(reader: R, config: StreamConfig) -> Result<Self, String>
Create a new async XML stream
Sourcepub fn position(&self) -> StreamPosition
pub fn position(&self) -> StreamPosition
Get the current stream position for progress tracking
Returns information about bytes processed and items parsed. Useful for progress bars and error reporting.
Auto Trait Implementations§
impl<R> Freeze for AsyncXmlStream<R>where
R: Freeze,
impl<R> RefUnwindSafe for AsyncXmlStream<R>where
R: RefUnwindSafe,
impl<R> Send for AsyncXmlStream<R>where
R: Send,
impl<R> Sync for AsyncXmlStream<R>where
R: Sync,
impl<R> Unpin for AsyncXmlStream<R>
impl<R> UnwindSafe for AsyncXmlStream<R>where
R: UnwindSafe,
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