[][src]Struct pikmin::writer::db_mysql::TableDef

pub struct TableDef(_, _);

A definition for MySQL. First value is a name of the column, and 2nd is a following definition in a CREATE TABLE statement.

Example

use pikmin::writer::db_mysql::TableDef;
fn table_def() -> Vec<TableDef> {
    vec![
        TableDef::new("id", "BIGINT NOT NULL PRIMARY KEY"),
        TableDef::new("traded_at", "TIMESTAMP(3) NOT NULL"),
        TableDef::new("amount", "FLOAT NOT NULL"),
        TableDef::new("price", "FLOAT NOT NULL"),
    ]
}

Methods

impl TableDef[src]

pub fn new(s1: &str, s2: &str) -> Self[src]

Creates a column of a table definition.

Trait Implementations

impl Debug for TableDef[src]

Auto Trait Implementations

impl Send for TableDef

impl Sync for TableDef

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self