pub struct Inference { /* private fields */ }Expand description
Every column’s inferred type, from Inferrer::infer.
Implementations§
Source§impl Inference
impl Inference
Sourcepub fn columns(&self) -> &[ColumnInference]
pub fn columns(&self) -> &[ColumnInference]
One entry per column, in order.
Sourcepub fn schema(&self) -> Schema
pub fn schema(&self) -> Schema
The schema these types describe: a field per column, nullable when any cell was null.
Sourcepub fn apply(&self, rows: &mut Rows)
pub fn apply(&self, rows: &mut Rows)
Convert rows’ cells to their columns’ types and attach
schema: null tokens become Value::Null, integer
columns Value::Int, float columns Value::Float. Booleans,
dates and timestamps stay as written (Value has no variant for
them) but are typed in the schema. A cell that does not parse as its
column’s (overridden) type is left as it was.
Trait Implementations§
impl Eq for Inference
Source§impl Renderable for Inference
A table of column, type and evidence.
impl Renderable for Inference
A table of column, type and evidence.
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
The
(minimum, maximum) cell width this renderable wants. Port of
__rich_measure__. The default is what upstream’s Measurement.get
returns for a renderable without one: anything from nothing to the
whole width, (0, max_width).Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.Source§fn vertical(&self) -> Option<VerticalAlign>
fn vertical(&self) -> Option<VerticalAlign>
The vertical alignment a
Table cell holding this renderable uses in
place of its column’s. Upstream reads getattr(renderable, "vertical", None); Align sets it.Source§fn print_end_line(&self, _options: &ConsoleOptions) -> bool
fn print_end_line(&self, _options: &ConsoleOptions) -> bool
Whether a top-level print ends this renderable’s last line. This
port’s renderables separate lines, where upstream’s end each line
with
"\n", so a print adds the final line break. A renderable
whose upstream output stops without one (Screen, LiveRender, a
Rule whose end has no newline) returns false, and the next
output continues its last line. options are the print’s options.impl StructuralPartialEq for Inference
Auto Trait Implementations§
impl Freeze for Inference
impl RefUnwindSafe for Inference
impl Send for Inference
impl Sync for Inference
impl Unpin for Inference
impl UnsafeUnpin for Inference
impl UnwindSafe for Inference
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.