Struct prettytable::Row
source · [−]pub struct Row { /* private fields */ }
Expand description
Represent a table row made of cells
Implementations
sourceimpl Row
impl Row
sourcepub fn get_mut_cell(&mut self, idx: usize) -> Option<&mut Cell>
pub fn get_mut_cell(&mut self, idx: usize) -> Option<&mut Cell>
Get the mutable cell at index idx
sourcepub fn set_cell(&mut self, cell: Cell, idx: usize) -> Result<(), &str>
pub fn set_cell(&mut self, cell: Cell, idx: usize) -> Result<(), &str>
Set the cell
in the row at the given idx
index
sourcepub fn insert_cell(&mut self, index: usize, cell: Cell)
pub fn insert_cell(&mut self, index: usize, cell: Cell)
Insert cell
at position index
. If index
is higher than the row length,
the cell will be appended at the end
sourcepub fn remove_cell(&mut self, index: usize)
pub fn remove_cell(&mut self, index: usize)
Remove the cell at position index
. Silently skip if this cell does not exist
Trait Implementations
sourceimpl<S: ToString> Extend<S> for Row
impl<S: ToString> Extend<S> for Row
sourcefn extend<T: IntoIterator<Item = S>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = S>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn 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.
sourcefn 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
sourceimpl<T, A> From<T> for Row where
A: ToString,
T: IntoIterator<Item = A>,
impl<T, A> From<T> for Row where
A: ToString,
T: IntoIterator<Item = A>,
sourceimpl<A: ToString> FromIterator<A> for Row
impl<A: ToString> FromIterator<A> for Row
sourcefn from_iter<T>(iterator: T) -> Row where
T: IntoIterator<Item = A>,
fn from_iter<T>(iterator: T) -> Row where
T: IntoIterator<Item = A>,
Creates a value from an iterator. Read more
sourceimpl FromIterator<Row> for Table
impl FromIterator<Row> for Table
sourceimpl<'a> IntoIterator for &'a Row
impl<'a> IntoIterator for &'a Row
sourceimpl<'a> IntoIterator for &'a mut Row
impl<'a> IntoIterator for &'a mut Row
impl Eq for Row
impl StructuralEq for Row
impl StructuralPartialEq for Row
Auto Trait Implementations
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnwindSafe for Row
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more