[−][src]Enum csv::NextField
NextField is the result of parsing a single CSV field.
This is only useful if you're using the low level next_bytes
method.
Variants
Data(&'a T)
A single CSV field as a borrowed slice of the parser's internal buffer.
Error(Error)
A CSV error found during parsing. When an error is found, it is
first returned. All subsequent calls of next_bytes
will return
EndOfCsv
. (EOF is exempt from this. Depending on the state of the
parser, an EOF could trigger Data
, EndOfRecord
and EndOfCsv
,
all in succession.)
In general, once EndOfCsv
is returned, no other return value is
possible on subsequent calls.
EndOfRecord
Indicates the end of a record.
EndOfCsv
Indicates the end of the CSV data. Once this state is entered, the parser can never leave it.
Methods
impl<'a, T: ?Sized + Debug> NextField<'a, T>
[src]
pub fn into_iter_result(self) -> Option<Result<&'a T>>
[src]
Transform NextField into an iterator result.
pub fn is_end(&self) -> bool
[src]
Returns true if and only if the end of CSV data has been reached.
pub fn unwrap(self) -> &'a T
[src]
Returns the underlying field data.
If NextField
is an error or an end of record/CSV marker, this will
panic.
Trait Implementations
Auto Trait Implementations
impl<'a, T: ?Sized> Send for NextField<'a, T> where
T: Sync,
T: Sync,
impl<'a, T: ?Sized> Sync for NextField<'a, T> where
T: Sync,
T: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,