pub struct IterTable<I> { /* private fields */ }
Available on crate feature
std
only.Expand description
A table which consumes an IntoRecords
iterator.
To be able to build table we need a dimensions.
If no width and count_columns is set, IterTable
will sniff the records, by
keeping a number of rows buffered (You can set the number via IterTable::sniff
).
Implementations§
source§impl<I> IterTable<I>
impl<I> IterTable<I>
sourcepub fn new(iter: I) -> Selfwhere
I: IntoRecords,
pub fn new(iter: I) -> Selfwhere
I: IntoRecords,
Creates a new IterTable
structure.
sourcepub fn with<O>(self, option: O) -> Self
pub fn with<O>(self, option: O) -> Self
With is a generic function which applies options to the IterTable
.
sourcepub fn sniff(self, count: usize) -> Self
pub fn sniff(self, count: usize) -> Self
Limit an amount of rows will be read for dimension estimations.
sourcepub fn to_string(self) -> String
pub fn to_string(self) -> String
Build a string.
We can’t implement std::string::ToString
cause it does takes &self
reference.
sourcepub fn fmt<W>(self, writer: W) -> Result
pub fn fmt<W>(self, writer: W) -> Result
Format table into fmt::Writeer.
Trait Implementations§
Auto Trait Implementations§
impl<I> RefUnwindSafe for IterTable<I>where
I: RefUnwindSafe,
impl<I> Send for IterTable<I>where
I: Send,
impl<I> Sync for IterTable<I>where
I: Sync,
impl<I> Unpin for IterTable<I>where
I: Unpin,
impl<I> UnwindSafe for IterTable<I>where
I: 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