Trait AsForeignKeyWithContext

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

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

Convert a structured value into a single representative CellValue using a context value

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(accessor: A, 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, A, T> AsForeignKeyWithContext<'a, 'r, A> for Vec<T>
where T: AsForeignKeyWithContext<'a, 'r, A>, A: 'r,

Source§

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

Source§

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

Source§

impl<'a, 's, A, C, T> AsForeignKeyWithContext<'a, 's, A> for Proxy<T>
where T: AsForeignKeyWithContext<'a, 's, A> + Contextual<Context = C>, A: Accessor<Context = C> + 's, C: Context + Owner<T>,

Source§

type CellReducer = ProxyCellReducer<<T as AsForeignKeyWithContext<'a, 's, A>>::CellReducer, A>

Available on crate feature row only.
Source§

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

Available on crate feature row only.
Source§

impl<'a, 's, T, A> AsForeignKeyWithContext<'a, 's, A> for Option<T>
where T: IntoRowWithContext<'s, A>, A: 's + Clone,

Source§

type CellReducer = SerializerCellReducer<'a, OptionSerializerWithContext<A>>

Source§

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

Implementors§