pub struct HeadersParsed { /* private fields */ }
Expand description
Holds both left and right CSV headers (if present).
The difference to Headers
is that this holds headers that might not have been parsed successfully.
Implementationsยง
Sourceยงimpl HeadersParsed
impl HeadersParsed
Sourcepub fn headers_left(&self) -> Option<Result<&ByteRecord, &Error>>
pub fn headers_left(&self) -> Option<Result<&ByteRecord, &Error>>
Return the Result
of parsing headers of the left CSV.
If the CSV has been parsed with has_headers(false)
,
this will return None
.
Sourcepub fn headers_right(&self) -> Option<Result<&ByteRecord, &Error>>
pub fn headers_right(&self) -> Option<Result<&ByteRecord, &Error>>
Return the Result
of parsing headers of the right CSV.
If the CSV has been parsed with has_headers(false)
,
this will return None
.
Trait Implementationsยง
Sourceยงimpl Debug for HeadersParsed
impl Debug for HeadersParsed
Sourceยงimpl Default for HeadersParsed
impl Default for HeadersParsed
Sourceยงfn default() -> HeadersParsed
fn default() -> HeadersParsed
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl From<(Option<Result<ByteRecord, Error>>, Option<Result<ByteRecord, Error>>)> for HeadersParsed
impl From<(Option<Result<ByteRecord, Error>>, Option<Result<ByteRecord, Error>>)> for HeadersParsed
Sourceยงfn from(
(headers_left, headers_right): (Option<Result<ByteRecord>>, Option<Result<ByteRecord>>),
) -> Self
fn from( (headers_left, headers_right): (Option<Result<ByteRecord>>, Option<Result<ByteRecord>>), ) -> Self
Converts to this type from the input type.
Auto Trait Implementationsยง
impl Freeze for HeadersParsed
impl !RefUnwindSafe for HeadersParsed
impl Send for HeadersParsed
impl Sync for HeadersParsed
impl Unpin for HeadersParsed
impl !UnwindSafe for HeadersParsed
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
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more