OwnedSheetStreamReader

Struct OwnedSheetStreamReader 

Source
pub struct OwnedSheetStreamReader { /* private fields */ }
Expand description

Owning variant of SheetStreamReader for use in FFI contexts where lifetime parameters are not supported (e.g., napi classes).

Stores its own copy of the shared string table and the XML byte source, avoiding any borrowed references. The parsing logic delegates to the same free functions used by the borrowed reader.

Implementations§

Source§

impl OwnedSheetStreamReader

Source

pub fn new( xml_bytes: Vec<u8>, sst: SharedStringTable, row_limit: Option<u32>, ) -> Self

Create a new owned streaming reader.

xml_bytes is the raw worksheet XML. sst is a read-only clone of the shared string table. row_limit optionally caps the total number of rows returned.

Source

pub fn next_batch(&mut self, batch_size: usize) -> Result<Vec<StreamRow>>

Read the next batch of rows. Returns an empty Vec when there are no more rows to read.

Source

pub fn has_more(&self) -> bool

Returns true if there are potentially more rows to read.

Source

pub fn close(self)

Close the reader and release resources.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.