pub struct WriterBuilder { /* private fields */ }Expand description
Builds a Writer with given configuration.
Implementations§
Source§impl WriterBuilder
impl WriterBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new WriterBuilder with default configuration.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new WriterBuilder 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 Writer.
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 Writer.
This char must be a single byte.
Will default to a double quote.
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 Writer’s buffered writer.
Sourcepub fn flexible(&mut self, yes: bool) -> &mut Self
pub fn flexible(&mut self, yes: bool) -> &mut Self
Indicate whether the created Writer should be “flexible”, i.e.
whether it should allow writing records having different number of
fields than the first one.
Will default to false.
Sourcepub fn from_writer<W: Write>(&self, writer: W) -> Writer<W>
pub fn from_writer<W: Write>(&self, writer: W) -> Writer<W>
Create a new Writer using the provided writer implementing
std::io::Write.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WriterBuilder
impl RefUnwindSafe for WriterBuilder
impl Send for WriterBuilder
impl Sync for WriterBuilder
impl Unpin for WriterBuilder
impl UnwindSafe for WriterBuilder
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