Trait AsForeignKey

Source
pub trait AsForeignKey<'a, 'r>: Sized {
    type CellReducer: CellReducer<'a, 'r, Self>;

    // Required method
    fn get_cell_reducer(key: &'a str) -> Self::CellReducer;
}
Available on crate feature row only.
Expand description

Convert a structured value into a single representative CellValue

The conversion takes a key, so that different consumers can choose different foreign keys to represent this type in their output.

Required Associated Types§

Source

type CellReducer: CellReducer<'a, 'r, Self>

Required Methods§

Source

fn get_cell_reducer(key: &'a str) -> Self::CellReducer

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.

Implementations on Foreign Types§

Source§

impl<'a, 'r, T> AsForeignKey<'a, 'r> for Vec<T>
where T: AsForeignKey<'a, 'r>,

Source§

type CellReducer = VecCellReducer<<T as AsForeignKey<'a, 'r>>::CellReducer>

Source§

fn get_cell_reducer(key: &'a str) -> Self::CellReducer

Implementors§

Source§

impl<'a, 'r, T> AsForeignKey<'a, 'r> for T
where T: IntoRow<'r>,

Source§

type CellReducer = SerializerCellReducer<'a, <T as IntoRow<'r>>::Serializer>