pub struct ByteHeadersIndex { /* private fields */ }Expand description
A ByteRecord wrapper for CSV headers that can be used to efficiently find
columns by name, position or even both.
Implementations§
Source§impl ByteHeadersIndex
impl ByteHeadersIndex
pub fn new(record: ByteRecord, has_names: bool) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn has_names(&self) -> bool
pub fn first_column_index_by_name( &self, name: impl AsRef<[u8]>, ) -> Option<usize>
pub fn find_column_index( &self, indexation: ColumIndexationBy<'_>, ) -> Option<usize>
Trait Implementations§
Source§impl AsRef<ByteRecord> for ByteHeadersIndex
impl AsRef<ByteRecord> for ByteHeadersIndex
Source§fn as_ref(&self) -> &ByteRecord
fn as_ref(&self) -> &ByteRecord
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Debug for ByteHeadersIndex
impl Debug for ByteHeadersIndex
Auto Trait Implementations§
impl Freeze for ByteHeadersIndex
impl RefUnwindSafe for ByteHeadersIndex
impl Send for ByteHeadersIndex
impl Sync for ByteHeadersIndex
impl Unpin for ByteHeadersIndex
impl UnsafeUnpin for ByteHeadersIndex
impl UnwindSafe for ByteHeadersIndex
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