[−][src]Struct table_extract::Row
A row in a Table
.
A row consists of a number of data cells stored as strings. If the row
contains the same number of cells as the table's header row, its cells can
be safely accessed by header names using get
. Otherwise,
the data should be accessed via as_slice
or by
iterating over the row.
This struct can be thought of as a lightweight reference into a table. As
such, it implements the Copy
trait.
Methods
impl<'a> Row<'a>
[src]
pub fn len(&self) -> usize
[src]
Returns the number of cells in the row.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the row contains no cells.
pub fn get(&self, header: &str) -> Option<&'a str>
[src]
Returns the cell underneath header
.
Returns None
if there is no such header, or if there is no cell at
that position in the row.
pub fn as_slice(&self) -> &'a [String]
[src]
Returns a slice containing all the cells.
pub fn iter(&self) -> Iter<String>
[src]
Returns an iterator over the cells of the row.
Trait Implementations
impl<'a> IntoIterator for Row<'a>
[src]
type Item = &'a String
The type of the elements being iterated over.
type IntoIter = Iter<'a, String>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a> Clone for Row<'a>
[src]
impl<'a> Copy for Row<'a>
[src]
impl<'a> Eq for Row<'a>
[src]
impl<'a> PartialEq<Row<'a>> for Row<'a>
[src]
impl<'a> Debug for Row<'a>
[src]
impl<'a> StructuralPartialEq for Row<'a>
[src]
impl<'a> StructuralEq for Row<'a>
[src]
Auto Trait Implementations
impl<'a> Send for Row<'a>
impl<'a> Sync for Row<'a>
impl<'a> Unpin for Row<'a>
impl<'a> UnwindSafe for Row<'a>
impl<'a> RefUnwindSafe for Row<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,