pub struct StringRecord { /* private fields */ }Expand description
An owned, decoded & unquoted/unescaped representation of a CSV record.
StringRecord are typically used with a Reader.
Creating a StringRecord:
use simd_csv::StringRecord;
let mut record = StringRecord::new();
record.push_field("john");
record.push_field("landis");Implementations§
Source§impl StringRecord
impl StringRecord
Sourcepub fn as_byte_record(&self) -> &ByteRecord
pub fn as_byte_record(&self) -> &ByteRecord
Return a reference to the underlying ByteRecord backing this record.
Sourcepub fn get(&self, index: usize) -> Option<&str>
pub fn get(&self, index: usize) -> Option<&str>
Return field at index. Will return None if index is out of bounds.
Sourcepub fn push_field(&mut self, field: &str)
pub fn push_field(&mut self, field: &str)
Append a new field to the back of the record.
Trait Implementations§
Source§impl Clone for StringRecord
impl Clone for StringRecord
Source§fn clone(&self) -> StringRecord
fn clone(&self) -> StringRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StringRecord
impl Debug for StringRecord
Source§impl Default for StringRecord
impl Default for StringRecord
Source§fn default() -> StringRecord
fn default() -> StringRecord
Returns the “default value” for a type. Read more
Source§impl<T: AsRef<str>> Extend<T> for StringRecord
impl<T: AsRef<str>> Extend<T> for StringRecord
Source§fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<T: AsRef<str>> FromIterator<T> for StringRecord
impl<T: AsRef<str>> FromIterator<T> for StringRecord
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl Hash for StringRecord
impl Hash for StringRecord
Source§impl Index<usize> for StringRecord
impl Index<usize> for StringRecord
Source§impl<'r> IntoIterator for &'r StringRecord
impl<'r> IntoIterator for &'r StringRecord
Source§impl PartialEq for StringRecord
impl PartialEq for StringRecord
impl Eq for StringRecord
Auto Trait Implementations§
impl Freeze for StringRecord
impl RefUnwindSafe for StringRecord
impl Send for StringRecord
impl Sync for StringRecord
impl Unpin for StringRecord
impl UnsafeUnpin for StringRecord
impl UnwindSafe for StringRecord
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