pub struct Reader<R> { /* private fields */ }Expand description
An already configured copying/unescaping CSV reader.
§Configuration
To configure a Reader, if you need a custom delimiter for instance of if
you want to tweak the size of the inner buffer. Check out the
ReaderBuilder.
Implementations§
Source§impl<R: Read> Reader<R>
impl<R: Read> Reader<R>
Sourcepub fn from_reader(reader: R) -> Self
pub fn from_reader(reader: R) -> Self
Create a new reader with default configuration using the provided reader
implementing std::io::Read.
Sourcepub fn has_headers(&self) -> bool
pub fn has_headers(&self) -> bool
Returns whether this reader has been configured to interpret the first record as a header.
pub fn byte_headers(&mut self) -> Result<&ByteRecord>
pub fn read_byte_record(&mut self, record: &mut ByteRecord) -> Result<bool>
pub fn byte_records(&mut self) -> ByteRecordsIter<'_, R>
pub fn into_byte_records(self) -> ByteRecordsIntoIter<R>
pub fn get_ref(&self) -> &R
pub fn get_mut(&mut self) -> &mut R
pub fn into_inner(self) -> R
pub fn into_bufreader(self) -> (Option<ByteRecord>, BufReader<R>)
Auto Trait Implementations§
impl<R> Freeze for Reader<R>where
R: Freeze,
impl<R> RefUnwindSafe for Reader<R>where
R: RefUnwindSafe,
impl<R> Send for Reader<R>where
R: Send,
impl<R> Sync for Reader<R>where
R: Sync,
impl<R> Unpin for Reader<R>where
R: Unpin,
impl<R> UnwindSafe for Reader<R>where
R: UnwindSafe,
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