Skip to main content

TableHKT

Trait TableHKT 

Source
pub trait TableHKT {
    type Mode: TableMode;
    type InMode<Mode: TableMode>;
}
Expand description

A trait abstracting the mode of a user defined table, which allows us to talk about the same table in two different modes.

impl<'scope, T: Column<'scope>> TableHKT<'scope> for MyTable<'scope, T> {
    type InMode<Mode: Column<'scope>> = MyTable<'scope, Mode>;

    type Mode = T;
}

Required Associated Types§

Source

type Mode: TableMode

The current mode of this table.

Source

type InMode<Mode: TableMode>

Replace the mode with another.

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.

Implementors§

Source§

impl<'scope, T: TableMode, A> TableHKT for One<'scope, T, A>
where A: Value,

Source§

type InMode<Mode: TableMode> = One<'scope, Mode, A>

Source§

type Mode = T

Source§

impl<'scope, T: TableMode, A, B> TableHKT for Two<'scope, T, A, B>
where A: Value, B: Value,

Source§

type InMode<Mode: TableMode> = Two<'scope, Mode, A, B>

Source§

type Mode = T

Source§

impl<'scope, T: TableMode, A, B, C> TableHKT for Three<'scope, T, A, B, C>
where A: Value, B: Value, C: Value,

Source§

type InMode<Mode: TableMode> = Three<'scope, Mode, A, B, C>

Source§

type Mode = T