#[non_exhaustive]pub struct CsvOptions {
pub encoding: String,
pub header_rows: i32,
pub delimiter: String,
pub quote: String,
/* private fields */
}Expand description
Describes CSV and similar semi-structured data formats.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.encoding: StringOptional. The character encoding of the data. Accepts “US-ASCII”, “UTF-8”, and “ISO-8859-1”. Defaults to UTF-8 if unspecified.
header_rows: i32Optional. The number of rows to interpret as header rows that should be skipped when reading data rows. Defaults to 0.
delimiter: StringOptional. The delimiter used to separate values. Defaults to ‘,’.
quote: StringOptional. The character used to quote column values. Accepts ‘“’ (double quotation mark) or ‘’’ (single quotation mark). Defaults to ‘”’ (double quotation mark) if unspecified.
Implementations§
Source§impl CsvOptions
impl CsvOptions
pub fn new() -> Self
Sourcepub fn set_encoding<T: Into<String>>(self, v: T) -> Self
pub fn set_encoding<T: Into<String>>(self, v: T) -> Self
Sets the value of encoding.
Sourcepub fn set_header_rows<T: Into<i32>>(self, v: T) -> Self
pub fn set_header_rows<T: Into<i32>>(self, v: T) -> Self
Sets the value of header_rows.
Sourcepub fn set_delimiter<T: Into<String>>(self, v: T) -> Self
pub fn set_delimiter<T: Into<String>>(self, v: T) -> Self
Sets the value of delimiter.
Trait Implementations§
Source§impl Clone for CsvOptions
impl Clone for CsvOptions
Source§fn clone(&self) -> CsvOptions
fn clone(&self) -> CsvOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CsvOptions
impl Debug for CsvOptions
Source§impl Default for CsvOptions
impl Default for CsvOptions
Source§fn default() -> CsvOptions
fn default() -> CsvOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for CsvOptions
impl PartialEq for CsvOptions
impl StructuralPartialEq for CsvOptions
Auto Trait Implementations§
impl Freeze for CsvOptions
impl RefUnwindSafe for CsvOptions
impl Send for CsvOptions
impl Sync for CsvOptions
impl Unpin for CsvOptions
impl UnwindSafe for CsvOptions
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