Struct tabled::grid::PeekableGrid
source · pub struct PeekableGrid<R, G, D, C> { /* private fields */ }
Available on crate feature
std
only.Expand description
Grid provides a set of methods for building a text-based table.
Implementations§
source§impl<R, G, D, C> PeekableGrid<R, G, D, C>
impl<R, G, D, C> PeekableGrid<R, G, D, C>
sourcepub fn new(
records: R,
config: G,
dimension: D,
colors: C
) -> PeekableGrid<R, G, D, C>
pub fn new( records: R, config: G, dimension: D, colors: C ) -> PeekableGrid<R, G, D, C>
The new method creates a grid instance with default styles.
source§impl<R, G, D, C> PeekableGrid<R, G, D, C>
impl<R, G, D, C> PeekableGrid<R, G, D, C>
sourcepub fn build<F>(self, f: F) -> Result<(), Error>where
R: Records + PeekableRecords + ExactRecords,
D: Dimension,
C: Colors,
G: Borrow<SpannedConfig>,
F: Write,
pub fn build<F>(self, f: F) -> Result<(), Error>where
R: Records + PeekableRecords + ExactRecords,
D: Dimension,
C: Colors,
G: Borrow<SpannedConfig>,
F: Write,
Builds a table.
sourcepub fn to_string(self) -> Stringwhere
R: Records + PeekableRecords + ExactRecords,
D: Dimension,
G: Borrow<SpannedConfig>,
C: Colors,
pub fn to_string(self) -> Stringwhere
R: Records + PeekableRecords + ExactRecords,
D: Dimension,
G: Borrow<SpannedConfig>,
C: Colors,
Builds a table into string.
Notice that it consumes self.
Trait Implementations§
source§impl<R, G, D, C> Clone for PeekableGrid<R, G, D, C>
impl<R, G, D, C> Clone for PeekableGrid<R, G, D, C>
source§fn clone(&self) -> PeekableGrid<R, G, D, C>
fn clone(&self) -> PeekableGrid<R, G, D, C>
Returns a copy 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 moreAuto Trait Implementations§
impl<R, G, D, C> RefUnwindSafe for PeekableGrid<R, G, D, C>
impl<R, G, D, C> Send for PeekableGrid<R, G, D, C>
impl<R, G, D, C> Sync for PeekableGrid<R, G, D, C>
impl<R, G, D, C> Unpin for PeekableGrid<R, G, D, C>
impl<R, G, D, C> UnwindSafe for PeekableGrid<R, G, D, C>
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