pub struct Grid<T, S = DefaultCellsSchema<T>> { /* private fields */ }
👎Deprecated: use
to_grid
Expand description
A builder used to create plain-text table.
This type will be removed in the future. Use the following methods instead.
Implementations§
source§impl<T: Cells> Grid<T, DefaultCellsSchema<T>>
impl<T: Cells> Grid<T, DefaultCellsSchema<T>>
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Grid
with DefaultCellsSchema
and prepare header rows.
source§impl<T, S: CellsSchema<Source = T>> Grid<T, S>
impl<T, S: CellsSchema<Source = T>> Grid<T, S>
sourcepub fn with_schema(schema: S) -> Self
pub fn with_schema(schema: S) -> Self
Create a new Grid
with specified schema and prepare header rows.
pub fn from_iter_with_schema( iter: impl IntoIterator<Item = T>, schema: S ) -> Self
pub fn to_csv(&self) -> String
Trait Implementations§
source§impl<T, S: CellsSchema<Source = T>> Debug for Grid<T, S>
impl<T, S: CellsSchema<Source = T>> Debug for Grid<T, S>
source§impl<T, S: CellsSchema<Source = T>> Display for Grid<T, S>
impl<T, S: CellsSchema<Source = T>> Display for Grid<T, S>
source§impl<T, S: CellsSchema<Source = T>> Extend<T> for Grid<T, S>
impl<T, S: CellsSchema<Source = T>> Extend<T> for Grid<T, S>
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: Cells> FromIterator<T> for Grid<T>
impl<T: Cells> FromIterator<T> for Grid<T>
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
Auto Trait Implementations§
impl<T, S> RefUnwindSafe for Grid<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for Grid<T, S>
impl<T, S> Sync for Grid<T, S>
impl<T, S> Unpin for Grid<T, S>
impl<T, S> UnwindSafe for Grid<T, S>where
S: UnwindSafe,
T: UnwindSafe,
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