pub struct Table { /* private fields */ }Expand description
Table of values
Implementations§
Source§impl Table
impl Table
Sourcepub fn new(headers: Vec<String>, data: Vec<Value>) -> Result<Table, Error>
pub fn new(headers: Vec<String>, data: Vec<Value>) -> Result<Table, Error>
Create a new table, with the given headers and data. It is assumed that number of column is equalt to headers, and the number of row is equal to length of data divided by number of columns.
Sourcepub fn get<T>(&self, row: usize, column: usize) -> Result<&T, Error>where
Value: ValueTryIntoRef<T>,
pub fn get<T>(&self, row: usize, column: usize) -> Result<&T, Error>where
Value: ValueTryIntoRef<T>,
value access
Sourcepub fn into_row_iter(self) -> IntoRowIter
pub fn into_row_iter(self) -> IntoRowIter
Transform into an iterator over the rows in the table
Trait Implementations§
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Forget for Table
impl Freeze for Table
impl Move for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more