pub struct SplitterBuilder { /* private fields */ }Expand description
Builds a Splitter with given configuration.
Implementations§
Source§impl SplitterBuilder
impl SplitterBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new SplitterBuilder with default configuration.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new SplitterBuilder with provided capacity.
Sourcepub fn delimiter(&mut self, delimiter: u8) -> &mut Self
pub fn delimiter(&mut self, delimiter: u8) -> &mut Self
Set the delimiter to be used by the created Splitter.
This delimiter must be a single byte.
Will default to a comma.
Sourcepub fn quote(&mut self, quote: u8) -> &mut Self
pub fn quote(&mut self, quote: u8) -> &mut Self
Set the quote char to be used by the created Splitter.
This char must be a single byte.
Will default to a double quote.
Sourcepub fn has_headers(&mut self, yes: bool) -> &mut Self
pub fn has_headers(&mut self, yes: bool) -> &mut Self
Indicate whether first record must be understood as a header.
Will default to true.
Sourcepub fn buffer_capacity(&mut self, capacity: usize) -> &mut Self
pub fn buffer_capacity(&mut self, capacity: usize) -> &mut Self
Set the capacity of the created Splitter’s buffered reader.
Sourcepub fn from_reader<R: Read>(&self, reader: R) -> Splitter<R>
pub fn from_reader<R: Read>(&self, reader: R) -> Splitter<R>
Create a new Splitter using the provided reader implementing
std::io::Read.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SplitterBuilder
impl RefUnwindSafe for SplitterBuilder
impl Send for SplitterBuilder
impl Sync for SplitterBuilder
impl Unpin for SplitterBuilder
impl UnwindSafe for SplitterBuilder
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