pub struct OpenOptions {
pub sheet_rows: Option<u32>,
pub sheets: Option<Vec<String>>,
pub max_unzip_size: Option<u64>,
pub max_zip_entries: Option<usize>,
pub read_mode: ReadMode,
pub aux_parts: AuxParts,
}Expand description
Options for controlling how a workbook is opened and parsed.
All fields default to None (no limit). Read mode defaults to Lazy
and auxiliary parts default to Deferred.
Use the builder-style setter methods for convenience.
Fields§
§sheet_rows: Option<u32>Maximum number of rows to read per sheet. Rows beyond this limit are silently discarded during parsing.
sheets: Option<Vec<String>>Only parse sheets whose names are in this list. Sheets not listed
are represented as empty worksheets (their XML is not parsed).
None means parse all sheets.
max_unzip_size: Option<u64>Maximum total decompressed size of all ZIP entries in bytes.
Exceeding this limit returns [Error::ZipSizeExceeded].
Default when None: no limit.
max_zip_entries: Option<usize>Maximum number of ZIP entries allowed.
Exceeding this limit returns [Error::ZipEntryCountExceeded].
Default when None: no limit.
read_mode: ReadModeRead mode: Lazy (default) skips auxiliary parts for faster
read-only workloads; Eager parses everything; Stream is
reserved for future streaming reads.
aux_parts: AuxPartsControls when auxiliary parts are parsed.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn new() -> OpenOptions
pub fn new() -> OpenOptions
Create a new OpenOptions with defaults (no limits, lazy read, deferred aux parts).
Sourcepub fn sheet_rows(self, rows: u32) -> OpenOptions
pub fn sheet_rows(self, rows: u32) -> OpenOptions
Set the maximum number of rows to read per sheet.
Sourcepub fn sheets(self, names: Vec<String>) -> OpenOptions
pub fn sheets(self, names: Vec<String>) -> OpenOptions
Only parse sheets whose names are in this list.
Sourcepub fn max_unzip_size(self, size: u64) -> OpenOptions
pub fn max_unzip_size(self, size: u64) -> OpenOptions
Set the maximum total decompressed size in bytes.
Sourcepub fn max_zip_entries(self, count: usize) -> OpenOptions
pub fn max_zip_entries(self, count: usize) -> OpenOptions
Set the maximum number of ZIP entries.
Sourcepub fn read_mode(self, mode: ReadMode) -> OpenOptions
pub fn read_mode(self, mode: ReadMode) -> OpenOptions
Set the read mode. Lazy skips auxiliary parts for faster
read-only workloads. Stream is reserved for future use.
Sourcepub fn aux_parts(self, policy: AuxParts) -> OpenOptions
pub fn aux_parts(self, policy: AuxParts) -> OpenOptions
Set the auxiliary parts parsing policy.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more