pub trait ArrayViewItem<H>: Clone + Sized{
// Required methods
fn to_column(&self, column: H) -> String;
fn to_row(&self) -> String;
// Provided methods
fn columns() -> Vec<(H, String)> { ... }
fn to_array_view(items: Vec<Self>) -> ArrayView<Self, H>
where Self: Sized { ... }
}Expand description
A trait for displaying items inside an
ArrayView.
Required Methods§
Provided Methods§
Sourcefn columns() -> Vec<(H, String)>
fn columns() -> Vec<(H, String)>
Returns the column definitions used by ArrayViewItem::to_array_view.
The default implementation returns an empty list, creating an
ArrayView with no columns.
Sourcefn to_array_view(items: Vec<Self>) -> ArrayView<Self, H>where
Self: Sized,
fn to_array_view(items: Vec<Self>) -> ArrayView<Self, H>where
Self: Sized,
Creates an ArrayView from the provided items.
Columns are populated from ArrayViewItem::columns.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.