Skip to main content

TableHKT

Trait TableHKT 

Source
pub trait TableHKT {
    type Mode: TableMode;
    type Of<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 Of<Mode: Column<'scope>> = MyTable<'scope, Mode>;

    type Mode = T;
}

Required Associated Types§

Source

type Mode: TableMode

The current mode of this table.

Source

type Of<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 Of<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 Of<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 Of<Mode: TableMode> = Three<'scope, Mode, A, B, C>

Source§

type Mode = T