[][src]Struct sleek_csv::byte_arena::ByteRecordArena

pub struct ByteRecordArena { /* fields omitted */ }

Implementations

impl ByteRecordArena[src]

pub fn new() -> ByteRecordArena[src]

pub fn with_headers(headers: Headers) -> ByteRecordArena[src]

pub fn record_count(&self) -> u64[src]

Returns the amount of full records. A possible partial record isn't included in the count.

pub fn is_partial(&self) -> bool[src]

Tells if ByteRecordArea contains a partial record. If either of field_data or field_ends contains items that isn't contained in a full record indicated by record_ends, the arena is considered to contain a partial record.

pub fn is_empty(&self) -> bool[src]

Tells if ByteRecordArena is empty i.e. it doesn't contain any input information. This includes:

  1. doesn't contain any header information
  2. doesn't contain any records However, it doesn't mean that the arena is in a "freshly initialized" state; it might contain a non-zero starting position or headers.

pub fn is_pristine(&self) -> bool[src]

Tells if ByteRecordArena is in the "freshly initialized" state i.e. it hasn't got any input information. This includes:

  1. doesn't contain any header information
  2. doesn't contain any records
  3. doesn't contain partial records
  4. doesn't have starting position other than 0. However, it doesn't take into account some purely internal properties that have only diminishingly small performance effects. These properties include the internal capacity of the storage fields and the info whether they have been zeroed or contain undefined bytes.

pub fn migrate_partial(&mut self, other: &mut ByteRecordArena) -> (usize, usize)[src]

Migrates the partial data over another arena. All data, including the partial record, on the other arena is deleted. Returns partial data length and partial field count.

pub fn flush(&mut self) -> (usize, usize)[src]

Deletes all records except the partial record. The user is expected to continue reading the partial record. Sets the start position anew, to be set again by Reader.

pub fn clear(&mut self)[src]

Deletes all records including the partial record. TODO: decide what to do with headers and start up position

pub fn headers(&self) -> Option<&Headers>[src]

pub fn start_pos(&self) -> Option<&Position>[src]

pub fn expose_data(&mut self) -> &mut [u8][src]

pub fn terminate_field(&mut self, field_size: usize)[src]

pub fn terminate_record(&mut self)[src]

pub fn reserve_space(&mut self, data: usize)[src]

pub fn iter(&self) -> ByteRecordsIter<'_>

Notable traits for ByteRecordsIter<'a>

impl<'a> Iterator for ByteRecordsIter<'a> type Item = RawRecord<'a>;
[src]

pub fn complete_partial(&mut self)[src]

Trait Implementations

impl Debug for ByteRecordArena[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.