pub struct XmlReader<'a> { /* private fields */ }Expand description
Reads XML records selected by an absolute path into Arrow batches.
Implementations§
Source§impl<'a> XmlReader<'a>
impl<'a> XmlReader<'a>
Sourcepub fn new<R: AsyncBufRead + Unpin + Send + 'a>(
input: R,
schema: XmlSchema,
record_path: &str,
options: ReaderOptions,
) -> Result<Self>
pub fn new<R: AsyncBufRead + Unpin + Send + 'a>( input: R, schema: XmlSchema, record_path: &str, options: ReaderOptions, ) -> Result<Self>
Creates a reader without reading input. Path prefixes use schema bindings.
Sourcepub async fn infer<R: AsyncBufRead + Unpin + Send + 'a>(
input: R,
record_path: &str,
bindings: &[NamespaceBinding<'_>],
options: ReaderOptions,
sampling: InferenceOptions,
) -> Result<Self>
pub async fn infer<R: AsyncBufRead + Unpin + Send + 'a>( input: R, record_path: &str, bindings: &[NamespaceBinding<'_>], options: ReaderOptions, sampling: InferenceOptions, ) -> Result<Self>
Infers a fixed schema from a bounded sample, then replays sampled records. Bindings resolve record-path prefixes; other namespaces get generated prefixes.
Sourcepub async fn next_batch(&mut self) -> Result<Option<RecordBatch>>
pub async fn next_batch(&mut self) -> Result<Option<RecordBatch>>
Returns a batch or EOF. The first error discards pending rows and ends input.
Cancelled calls can resume; calls after an error return None.
Sourcepub fn into_stream(self) -> BoxStream<'a, Result<RecordBatch>>
pub fn into_stream(self) -> BoxStream<'a, Result<RecordBatch>>
Consumes the reader as a batch stream.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for XmlReader<'a>
impl<'a> !Sync for XmlReader<'a>
impl<'a> !UnwindSafe for XmlReader<'a>
impl<'a> Forget for XmlReader<'a>
impl<'a> Freeze for XmlReader<'a>
impl<'a> Send for XmlReader<'a>
impl<'a> Unpin for XmlReader<'a>
impl<'a> UnsafeUnpin for XmlReader<'a>
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