Skip to main content

DataFrameRowBorrow

Trait DataFrameRowBorrow 

Source
#[doc(hidden)]
pub trait DataFrameRowBorrow: Sized { // Required method fn rows_ref_into_column_list(rows: &[Self]) -> List; }
Expand description

Borrowed rows → data.frame column list, emitted by #[derive(DataFrameRow)] on the row type.

The same orphan-rule bridge as DataFrameRowConvert: the derive implements this #[doc(hidden)] trait on the local row type, and miniextendr_api carries the blanket IntoDataFrame impls for &[T] and &Vec<T> below. Users call rows.as_slice().into_dataframe()? or (&rows).into_dataframe()?.

The derive implements it only where the fill can run: every value the fill clones has a Clone type, each bound behind a higher-ranked binder so the impl simply does not apply when one fails. A row with a non-Clone field therefore still derives, and converts as an owned Vec<Row>; asking for its borrowed conversion names the field type that is not Clone. The message below is for a row type that does not derive DataFrameRow.

Required Methods§

Source

fn rows_ref_into_column_list(rows: &[Self]) -> List

Build the data.frame-shaped column list of rows without consuming them.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§