pub struct OptionSet {
pub sheet: Option<String>,
pub index: u32,
pub path: Option<String>,
pub rows: RowOptionSet,
pub jsonl: bool,
pub max: Option<u32>,
pub omit_header: bool,
pub header_row: u8,
pub read_mode: ReadMode,
}Expand description
Core options with nested row options
Fields§
§sheet: Option<String>§index: u32§path: Option<String>§rows: RowOptionSet§jsonl: bool§max: Option<u32>§omit_header: bool§header_row: u8§read_mode: ReadModeImplementations§
Source§impl OptionSet
impl OptionSet
Sourcepub fn new(path_str: &str) -> Self
pub fn new(path_str: &str) -> Self
Instantiates a new option set with a path string for file operations.
Sourcepub fn sheet_name(&mut self, name: String) -> &mut Self
pub fn sheet_name(&mut self, name: String) -> &mut Self
Sets the sheet name for the operation.
Sourcepub fn sheet_index(&mut self, index: u32) -> &mut Self
pub fn sheet_index(&mut self, index: u32) -> &mut Self
Sets the sheet index.
Sourcepub fn json_lines(&mut self) -> &mut Self
pub fn json_lines(&mut self) -> &mut Self
Sets JSON Lines mode to true.
Sourcepub fn omit_header(&mut self) -> &mut Self
pub fn omit_header(&mut self) -> &mut Self
Omits the header when reading.
Sourcepub fn header_row(&mut self, row: u8) -> &mut Self
pub fn header_row(&mut self, row: u8) -> &mut Self
Sets the header row number.
Sourcepub fn max_row_count(&mut self, max: u32) -> &mut Self
pub fn max_row_count(&mut self, max: u32) -> &mut Self
Sets the maximum number of rows to read.
Sourcepub fn read_mode_async(&mut self) -> &mut Self
pub fn read_mode_async(&mut self) -> &mut Self
Sets the read mode to asynchronous.
pub fn to_json(&self) -> Value
Sourcepub fn header_row_index(&self) -> usize
pub fn header_row_index(&self) -> usize
header row index as usize
pub fn capture_rows(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptionSet
impl RefUnwindSafe for OptionSet
impl Send for OptionSet
impl Sync for OptionSet
impl Unpin for OptionSet
impl UnwindSafe for OptionSet
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