pub struct Headers { /* private fields */ }
Expand description
Holds both left and right CSV headers (if present).
The difference to HeadersParsed
is that this holds headers (if present) that have been parsed successfully.
Implementationsยง
Sourceยงimpl Headers
impl Headers
Sourcepub fn headers_left(&self) -> Option<&ByteRecord>
pub fn headers_left(&self) -> Option<&ByteRecord>
Return the successfully parsed headers of the left CSV (if present).
If the CSV has been parsed with has_headers(false)
,
this will return None
.
Sourcepub fn headers_right(&self) -> Option<&ByteRecord>
pub fn headers_right(&self) -> Option<&ByteRecord>
Return the successfully parsed headers of the right CSV (if present).
If the CSV has been parsed with has_headers(false)
,
this will return None
.
Trait Implementationsยง
Sourceยงimpl From<(Option<ByteRecord>, Option<ByteRecord>)> for Headers
impl From<(Option<ByteRecord>, Option<ByteRecord>)> for Headers
Sourceยงfn from(
(headers_left, headers_right): (Option<ByteRecord>, Option<ByteRecord>),
) -> Self
fn from( (headers_left, headers_right): (Option<ByteRecord>, Option<ByteRecord>), ) -> Self
Converts to this type from the input type.
Sourceยงimpl TryFrom<HeadersParsed> for Headers
impl TryFrom<HeadersParsed> for Headers
impl StructuralPartialEq for Headers
Auto Trait Implementationsยง
impl Freeze for Headers
impl RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl UnwindSafe for Headers
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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