Struct Row

Source
pub struct Row<'mmap> { /* private fields */ }

Implementations§

Source§

impl<'mmap> Row<'mmap>

Source

pub fn new( slice: &'mmap [u8], field_separator: u8, string_delimiter: u8, force_mem_cacher: bool, ) -> Self

§Constructor
  • Make a new instance of Row struct.
Source

pub fn new_empty() -> Self

§Creates a new Empty row
Source

pub fn is_empty(&self) -> bool

§Is Empty
  • Gets if a row is empty
Source

pub fn get_slice(&self) -> &'mmap [u8]

§Get Slice of &[u8] bytes
  • Gets a reference of the bytes inside row.
§returns : &’mmap [u8]
Source

pub fn next_field(&mut self) -> Option<Field<'mmap>>

§Next Field
  • Finds the next slice between current position and delimiter
  • Pack this slice, inside a Field struct in order to access field functions.
  • Can iter between differents Fields, in order.
§returns : An Option<Field<’mmap>>
Source

pub fn get_index(&mut self, index: usize) -> Field<'mmap>

§Get Field by Index
  • Receives an usize (zero based index), and returns the field associated to the iteration.
§returns: An Option<Field<’mmap>>
Source

pub fn decode_line(&mut self, enc: Encoding) -> Cow<'_, str>

§Decodes the full line
  • Must give the encoding.

Trait Implementations§

Source§

impl<'mmap> Debug for Row<'mmap>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'mmap> Freeze for Row<'mmap>

§

impl<'mmap> RefUnwindSafe for Row<'mmap>

§

impl<'mmap> Send for Row<'mmap>

§

impl<'mmap> Sync for Row<'mmap>

§

impl<'mmap> Unpin for Row<'mmap>

§

impl<'mmap> UnwindSafe for Row<'mmap>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.