Skip to main content

TableMode

Trait TableMode 

Source
pub trait TableMode {
    type T<'scope, V>;
}
Expand description

Table modes, this trait is used to switch the types of a rust structs fields.

You should use it in table struct like so:

use rust_rel8::*;

struct MyTable<'scope, Mode: TableMode> {
  id: Mode::T<'scope, i32>,
  name: Mode::T<'scope, String>,
  age: Mode::T<'scope, i32>,
}

Required Associated Types§

Source

type T<'scope, V>

A Gat, the resultant type may or may not incorporate V.

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 TableMode for EmptyMode

Source§

type T<'scope, V> = ()

Source§

impl TableMode for ExprMode

Source§

type T<'scope, V> = Expr<'scope, V>

Source§

impl TableMode for ExprNullifiedMode

Source§

type T<'scope, V> = Expr<'scope, Option<V>>

Source§

impl TableMode for NameMode

Source§

type T<'scope, V> = &'static str

Source§

impl TableMode for ValueMode

Source§

type T<'scope, V> = V

Source§

impl TableMode for ValueNullifiedMode

Source§

type T<'scope, V> = Option<V>